How to setup WPF parent/child listboxes

greyophaze

New Member
I need selected item of Listbox1 to provide XmlDataprovider source for second Listbox.Listbox1 uses:\[code\]<XmlDataProvider x:Key="CategoryXML" Source="C:\Category.xml" XPath="category" /> \[/code\]Ex: Category.xml\[code\]<?xml version="1.0" encoding="ISO-8859-1"?><main><category> <name>Local</name> <XmlFileName>C:\Doc1.xml</XmlFileName></category><category> <name>National</name> <XmlFileName>C:\Doc2.xml</XmlFileName></category><category> <name>Global</name> <XmlFileName>C:\Doc3.xml</XmlFileName></category></main>\[/code\]xaml:\[code\]<ListBox ItemsSource="{Binding Source={StaticResource CategoryXML},XPath=//main//category}" SynchronizedWithCurrentItem="True" Name="CategoryList">\[/code\]ListBox2:\[code\]<XmlDataProvider x:Key="itemXML" Source="?" **XmlFileName of select item in Listbox1** XPath="item" /> \[/code\]The problem I'm having is finding the correct syntax for making XmlFileName the source for itemXML. The user will select the \[code\]<name>\[/code\] in ListBox1 and send the \[code\]<XmlFileName>\[/code\] to itemXML which feeds Listbox2
 
Top