From my understanding, it appears that INotifyPropertyChanged is very useful when working with UI elements that are related to one object source. I’m just curious as to why some classes in the .net framework which may in some way be used with the UI do not implement INotifyPropertyChanged? For example SerialPort class.
Is there a recommended guideline on the use of INotifyPropertyChanged? or have I totally misunderstood the concept of the interface?
This question was brought about after trying to link several custom user controls to the SerialPort class.
You understood the interface correctly.
But thinking
SerialPortclass is somehow related to UI is the bad thing. This class is supposed to allow access to this one resource. Nothing more, nothing less. If you want to somehow display information related toSerialPort, you should create your own business class, that will useSerialPortand expose needed information through properties andINotifyPropertyChanged.