P
Paul H
Hi,
I have a simple class that implements INotifyPropertyChanged.
I can create an instance of the class and bind it to a textbox.
Changing a property of this object automatically updates the textbox as
expected. Works great.
Next, I created a custom control based on TextBox that implements a
'MyText' get/set. This just sets/gets the Text property.
Again, this works well. But I noticed something odd while debugging.
Changing a single property causes *all* controls bound to this object to
re-bind (i.e. the get method is called). Only 1 PropertyChanged event
is fired, for the property that has changed.
So if I have 20 properties and I update them all (e.g. loading from
disk) I see 20*20 calls to the get method of MyText.
Is this expected behaviour?
I have a simple class that implements INotifyPropertyChanged.
I can create an instance of the class and bind it to a textbox.
Changing a property of this object automatically updates the textbox as
expected. Works great.
Next, I created a custom control based on TextBox that implements a
'MyText' get/set. This just sets/gets the Text property.
Again, this works well. But I noticed something odd while debugging.
Changing a single property causes *all* controls bound to this object to
re-bind (i.e. the get method is called). Only 1 PropertyChanged event
is fired, for the property that has changed.
So if I have 20 properties and I update them all (e.g. loading from
disk) I see 20*20 calls to the get method of MyText.
Is this expected behaviour?