WPF ComboBox Object Binding - not updating DataContext Object
- by Jaysen
Hello, I have the following scenario:
1 class called 'Widget' with the properties: ID, Code, Description
1 class called 'MyWidget' with a property: m_Widget As Widget
1 ComboBox
The ComboBox has a List(Of Widget) set as the ItemSource.
I create an instance of 'MyWidget' named MyWidget1 and I set the property values of the m_Widget to match one of the items in the 'ComboBox List(Of Widget)'.
I then set the DataContext of the ComboBox to MyWidget1.Widget.
When I change the ComboBox selected item, only the ID property of 'MyWidget1.Widget' gets updated...
How do I get the object 'Widget' on 'MyWidget1' to be updated instead of just 'MyWidget1.Widget.ID'?
Here is a link to a sample project demonstrating this scenario:
http://www.webpersona.com/ObjectBinding.zip
Thanks in advance for any help :)