I have created a user control (supplierPicker) intended to allows a supplier database to be searched and a supplier selected. I want to be able to use this control in a number of other user controls, by binding the suppplierID property of the supplierPicker
to a supplierID property in a business object, which is set as the datacontext of the parent user control.
When I do this, and there is a supplierID specified in the business ofbject, the binding sets the supplierID in the supplierPicker control and it shows the correct supplier name in the textbox. However when the supplierID DependencyProperty is
changed from within the supplierPicker the newly selected supplier name is shown in the TextBox, but the SupplierID does not propogate back to the business object.
Other controls on the parent form work fine, so the binding to the business object seems to be ok.
Any pointers as to what I'm doing wrong here would be grately appreciated. This one has been driving me nuts for days!
Snipped code for the supplier picker:
public partial class SupplierPicker : UserControl, INotifyPropertyChanged
public static DependencyProperty SupplierIDProperty;
public event PropertyChangedEventHandler PropertyChan
View Complete Post