none
how to bind xmldataprovider in MVVM? RRS feed

  • General discussion

  • Hello everyone,

    I am new in MVVM. I am trying to binding XmlDataProvider with a treeview. I have a XmlProvider in my view,and i want to bind its source property with a another property which is situated in my viewmodel class ie Filepath property. For that i am writing this code

    <XmlDataProvider x:Key="xmlDataProvider" Source="{Binding FilePath}" />
    
    

    but it shows this error

    A Binding can not be set on Source property of type XmlDataProvider.Binding can only be set on  Dependency Property of Dependecy Object.

    So how can I bind that Source of XmlDataProvider with the property which is in ViewModel?Is there any other solution for bind that property into View??

    • Edited by Apoorv_Jain Thursday, September 23, 2010 9:33 AM
    Thursday, September 23, 2010 8:39 AM

All replies

  • How to bind XmlDataProvider.Source to MVVM property
    http://stackoverflow.com/questions/1866942/how-to-bind-xmldataprovider-source-to-mvvm-property

    XMLDataProvider MVVM
    http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/29e58948-22dc-4d23-9962-d3e5ce684e76

    Some addition links are given below


    How to: Create and Bind to an ObservableCollection
    http://msdn.microsoft.com/en-us/library/ms748365.aspx


    vM Workshop: Model View ViewModel (MVVM) and the Presentation Model Pattern in 5 UI Platforms
    http://www.youtube.com/watch?v=zXIzIzbO7pM

    MVVM Pattern Test Command like Behavior Using HugeFlow DLL
    http://www.youtube.com/watch?v=-h31Iy1JWOY


    MVVM, a WPF UI Design Pattern - Essential Edition
    http://www.youtube.com/watch?v=sBaaoi3uJT4&p=3E4B20D82EAB7A1F&playnext=1&index=2


    PHIJO MP
    Thursday, September 23, 2010 8:54 AM