Is your Product class a ViewModel? If so, it should derive from ViewModelBase.
Then, your Name setter should look something like:
Could you give more details?
Then, your Name setter should look something like:
set
{
if (Name == value)
{
return;
}
Name = value;
RaisePropertyChanged(() => Name);
}
If your textbox's Text property is bound to the Name property, the textbox should update when the Name property changes. Could you give more details?
- How have you set the DataContext for the textbox?
- What happens when the button is clicked?