开发者

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 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜