I have a custom control which is inherited from TextBox control.
I would like to implement the INotifyPropertyChanged
interface in my custom control.
the PropertyChanged event handler is alwas null.
This will always be true until something subscribes to the PropertyChanged
event.
Typically, if you're making a custom control, however, you wouldn't use INotifyPropertyChanged
. In this scenario, you'd make a Custom Dependency Property instead. Normally, the dependency objects (ie: controls) will all use Dependency Properties, and INPC is used by the classes which become the DataContext
of these objects. This allows the binding system to work properly.