I am working at WPF application which manages datas for a Hospital, it is a classical Software Manager. My problem is the follwing:
When I open a window with contains Texbox, Combo or Grids I could change datas, save and close, but if the user closes it without save I will lose my changes. The common pattern I follow is check for any content ui element if its value was modified but that means to check any window in my application and write so much code. The question is, there is a way in WPF to know if ui element value was changed writring the code just once in generic class to inherits or in a static class?
Properly I mean if there is a native way which is built in in WPF, at moment the only way I keep in mind is find all of type control which can contains datas, attach "change event" and check if save is clicked before quit the window..
There any best practice to do it?
thanks