W
wpfRookie
Hello,
I would like to populate a wpf combo box from a data island in XAML.
I adapted an example I found on the net, like so:
<Window.Resources>
<XmlDataProvider x:Key="GreekHeroesData" XPath="GreekHeroes/Hero">
<x:XData>
<GreekHeroes xmlns="">
<Hero Name="Jason" />
<Hero Name="Hercules" />
</GreekHeroes>
</x:XData>
</XmlDataProvider>
</Window.Resources>
<ComboBox ItemsSource="{Binding Source={StaticResource GreekHeroesData}}"
But the combo stays empty. What is wrong here?
Thanks for your help.
wpfRookie
I would like to populate a wpf combo box from a data island in XAML.
I adapted an example I found on the net, like so:
<Window.Resources>
<XmlDataProvider x:Key="GreekHeroesData" XPath="GreekHeroes/Hero">
<x:XData>
<GreekHeroes xmlns="">
<Hero Name="Jason" />
<Hero Name="Hercules" />
</GreekHeroes>
</x:XData>
</XmlDataProvider>
</Window.Resources>
<ComboBox ItemsSource="{Binding Source={StaticResource GreekHeroesData}}"
</Window></ComboBox>
But the combo stays empty. What is wrong here?
Thanks for your help.
wpfRookie