locked
XAML created via VS2010 IDE for Data Binding incorrect? RRS feed

  • General discussion

  • I am binding to an object which is a ModelView. I am using the follwing XAML to set the DataContext for design time visibility of the object properties.

              d:DataContext="{d:DesignInstance q:ModelViewController}"

    I then bind to a collection property of my object and set the DisplayMemberPath using the IDE which creates the following property against my combo box,

              DisplayMemberPath="{Binding Path=SalesReps/Name}"

    I run the project and I see no data in the combo box. So I manually alter the XAML to,

              DisplayMemberPath="Name"

    and I now see the data in my combo box.

     

    Have I missed something?

    Chris.

    Monday, June 7, 2010 9:52 AM