Here's a code snippet of a WPF treeview binding to a xml file, which gets reloaded everytime the xml file is physically changed.
The sample xml file I'm using (located at "C:\data.xml"):
The XAML code:
And finally the C# code-behind code for the same window that monitors the xml file changes and updates the binding accordingly:
Sem comentários:
Enviar um comentário