Several sources mention using
CollectionViewSource (
https://social.msdn.microsoft.com/Forums/silverlight/en-US/95031d3f-1b7d-45b9-88d3-07a07c2ea90d/data-sorting-with-xmldataprovider?forum=silverlightcontrols[
^])
<window>
<Window.Resources>
<XmlDataProvider x:Key="xmlData" Source="MyData.xml" XPath="CustDB/Customer"/>
</Window.Resources>
<Grid.DataContext>
<CollectionViewSource x:Name="dataCvs" Source="{Binding Source={StaticResource xmlData}}" />
</Grid.DataContext>
</window>
To the code behind you add somewhere (some Loaded or Click event) the following:
dataCvs.SortDescriptions.Clear()
dataCvs.SortDescriptions.Add(
New SortDescription With {.PropertyName = "Name"})
However, it's simpler and more recommended to use Linq. Like you previously tried :) :
Binding Text Box to Combo Box populated with LINQ to XML data[
^]