INotifyPropertyChanged WPF -


What is the purpose of INotifyPropertyChanged. I know that whenever the property changes, then this event is removed, but see how / UI can know how this event has been removed:

This is my client class which is INotifyPropertyChanged Implementing the event:

  public class customer: INotifyPropertyChanged {Private string _firstName; Public String LastName {get; Set; } Private Event PropertyChangedEventHandler PropertyChanged; Protected Zero OnPropertyChanged (string propertyName) {If Property (PropertyChanged! = Zero) property changed (this, New PropertyChangedEventArgs (propertyName)); } Public string first name {back {return_firstName; } Set {_firstName = value; OnPropertyChanged ("First"); }}}  

But now the way to inform the UI is that the property has changed. As the user is given blank or empty space on the first name, how can I show the message box on the UI

INotifyPropertyChangedWinFF UI Elements (through standard data binding mechanisms) to subscribe to the event changing event and Automatically allows to update itself. For example, if you have a TextBlock display your FirstName property, by using INotifyPropertyChanged, you can display it on a form, and it will automatically remain on the date when the FirstName property changes in the code.

Just subscribe to the event See - All that is required in this event also includes the name of the converted property, so if a UI element is bound to that property, then it is updated.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -