在下面的代码中:当我更新myXml.xml时,有没有办法自动更新ComboBox.Items?
我知道'myXml.xml'是否是本地的,我可以使用像this这样的FileSystemWatcher
。但是这个呢?
<Grid.Resources>
<XmlDataProvider Source="http://www.mywebsite.com/myXml.xml"
x:Key="myXml" XPath="/data/names"/>
</Grid.Resources>
<ComboBox ItemsSource="{Binding Source={StaticResource myXml}}"
DisplayMemberPath="@name"/>