WPF Master -Detail Binding XElement <p>I have a XElement that has the following structure</p> <pre><code>&lt;document num="1"&gt; &lt;pages&gt; &lt;page /&gt; &lt;page /&gt; &lt;/pages&gt; &lt;/document/&gt; </code></pre> <p>I have one Listbox named "documents" that is bound to an XElement in the following manner:</p> <pre><code>ItemsSource="{Binding Path=TheXElement.Elements[document]}" </code></pre> <p>I want to have a second ListBox named "pages" whose ItemsSource is the pages based on the selected document in the first list box.</p> <pre><code>ItemsSource="{Binding ElementName=documents,Path=SelectedItem.Element[pages].Elements[page]}" </code></pre> <p>Of source ,the above statement does not work. When I try the following <code>ItemsSource="{Binding ElementName=documents,Path=SelectedItem}</code>, the "pages" ListBox does get bound to the correct document, but it gets a binding error "ReferenceConverter cannot convert from System.Xml.Linq.XElement"</p> <p>I think I'm close, but having issues getting it to work. How can I correctly bind the "pages" ListBox to the SelectedItem of the "documents" ListBox?</p> <p>Thanks!</p>