Bind XML to listvaluews in ComboBox
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to bind an XML to display as list values in an combobox but the items in the combobox do not diplay properly, no text is visible but there seems to be items in the drop down list.
I use this code to define the datasource
<XmlDataProvider x:Key="TransDB" Source="C:\ProgramData\Autodesk\Vault 2016\Extensions\DataStandard\Cadcraft\LanguageTranslator\LanguageTranslations.xml"/>
And I use this code to define my combobox and to bind the listvalues to my XML data source.
<ComboBox Grid.Row="10" Grid.Column="1" IsEditable="True" ItemsSource="{Binding Source={StaticResource TransDB}, XPath=/TranslatorData/TranslationsEntries/TranslationsEntries/Translation}" DisplayMemberPath="@TranslationText" SelectedValuePath="@TranslationText" Text="{Binding Prop[Title].Value, UpdateSourceTrigger=PropertyChanged}"/>
I have attached the datasource XML. What am i missing, why does not the "TranslationText" attribute show up in the listvalues for the combobox?
Thanks