c# - How to catch property changing using Postsharp? -
After
I have a viewmodel that has been tagged with [NotifyPropertyChanged]
. Properties are bound to input controls, such as text boxes, I need to know, that the property of the model was changed due to the input.
How can I catch this incident?
If the client decorated with a notebook implements INotifyPropertyChanged, then PostSharp requires that the signature There is a method with:
Zero OnPropertyChanged (string propertyName)
This method has been specifically changed to the property. A work example might look like this:
[NotifyPropertyChanged] Public class OsModel: INotifyPropertyChanged {public integer P1 {find; Set; } Private Event PropertyChangedEventHandler PropertyChanged; Protected Virtual Zero OnPropertyChanged (string propertyName) {PropertyChanged (New, PropertyChangedEventArgs (propertyName)); }}
Additional information can be found.
Comments
Post a Comment