views:

40

answers:

2
+3  Q: 

binding in wpf/ C#

Hi

I have a xml file which I want to edit using automatic data binding in my wpf application. Can anyone lead me into this please? For example, can I add all the xml contents into a treeview? More...if I modify the xml by hand, will the treeview auto-refresh with the new values?

Thanks

+2  A: 

For a really good introduction to a very maintainable way to do databinding in WPF, see Josh Smith's articel on MVVM.

It doesn't explicitly discuss binding to XML, but it should give you a really good idea of the power of WPF databinding.

Mark Seemann
+2  A: 

I think you are looking for the XmlDataProvider. Here is an article about how to use it: http://www.codeproject.com/KB/WPF/WpfXml2WayDataBinding.aspx

Konamiman