Brent
Brent

Reputation: 1388

WPF SelectionChanged event for all items in window?

I have a Window with many items in it, is there a Window or Grid Event to tell if the user has changed any textbox, combobox, radiobutton, checkbutton etc? I don't want to go through each item and add SelectionChanged event as this is just to tell if anything has changed since the data was last saved.

Upvotes: 0

Views: 240

Answers (1)

CharithJ
CharithJ

Reputation: 47520

I think you should implement INotifyPropertyChanged interface which notify you once any property changed.

Here is an example that describes "Bind Better With INotifyProperty". This example is for a Windows App, but hope it would give you an idea.

Doing your job in this way is much elegant than adding events for each controls.

Upvotes: 1

Related Questions