开发者

WPF SelectionChanged event for all items in window?

开发者 https://www.devze.com 2023-03-09 15:02 出处:网络
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 thr开发者_Python百科ough

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 thr开发者_Python百科ough each item and add SelectionChanged event as this is just to tell if anything has changed since the data was last saved.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消