views:

123

answers:

0

I'd like to implement the Master-Detail pattern in my WPF application, so that when the user selects an item in a ListView its details are displayed elsewhere. However my data source (some XML) is not structured in a hierarchical manner; rather, each item stores a list of IDs which can be used to identify the details in another section of the XML:

<Config>
    <Item>
        <RecordReference RecordId="1" />
        <RecordReference RecordId="2" />
    <Item>
    <Records>
        <Record Id="1" Field1="SomeDetails" Field2="SomeDetails">
        <Record Id="2" Field1="SomeDetails" Field2="SomeDetails">
    </Records>
</Config>

How can I use XML, XAML, and data binding to implement this pattern when the master and detail data are located in different sections of the XML document?

I found XPath Variable/Dynamic Parameters in WPF Binding, but the article is old and I'm wondering if there's a better way.