As far as I know, INotifyPropertyChanges was "invented" before WPF. Could someone please explain what is new in WPF that allowed to do different kinds of binding properties of the control to the properties of objects.
Either this was also available in the WinForms but wasn't so popular due to some reasons? (if yes, what is that reasons)?
Thanks.
In WPF, you can bind not only to objects implementing INotifyPropertyChanged
, but also to dependency objects exposing dependency properties, which are much more flexible than regular properties.
There are also new interfaces for collections :
INotifyCollectionChanged
, which allows collections to send notifications when items are added, deleted or replacedICollectionView
, which defines how a collection is presented to the UIThe WPF binding mechanism is also much more flexible than the Windows Forms bindings... In Windows Forms, you could only say : Bind property X of object A to property Y of object B. There was no DataContext, so you couldn't define relative bindings. You couldn't use complex property paths (e.g. A.X.Items[foo].Bar). All conversions had to be done in event handlers rather than in reusable converters. Bindings could only be defined on controls, whereas in WPF any DependencyObject
can use bindings. And so on...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With