I am trying to bind the value of the ItemTemplate on a listbox to an attribute in my xml data. The attribute value will match the key of a data template I have defined elsewhere.
When I try the following I don't get any build errors but nothing shows up in the ItemContainer (its obviously not associating the value of the node with a resource to lookup);
<ListBox ItemsSource="{Binding Mode=Default, XPath=Event}" ItemTemplate="{Binding Mode=Default, Source={StaticResource EventsTestDataDataSource}, XPath=../@PanelLayout}"/>
I think it might have to do with the fact that ItemTemplate is expecting a type of 'Resource' but the binding is returning just a string. I searched for several hours tonight into value converters (converting a string to a ResourceKey) but that stuff is still a bit over my head. Any help or direction on what I should be searching for to solve this problem would be greatly appreciated.