Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

IsModified (IsDirty) flag management

$
0
0

Hello,

My question is about IsModified (IsDirty) flag management technique.

I have a SDI application, and I wish to implement modification detection as good as possible. I'm sure WPF offer all what I need, but I'm just too recent in the practice to make it correctly.

I have a datacontext object (model) that contains objects, that contains objects... classic. I need to change the flag to true each time an information is modified by the user.

I'm sure putting boolean in each objects of the model, with INotifyPropertyChange or some Tracking interface is a stupid thing.

I'm sure creating a view-model over each object of the datacontext is a bad approach too, because cost in memory, tons of work to "wrap" models, and assume coherency.

What could be the approach. To be concrete, the application has a TreeView at left, that make possible to select, add or remove an item, and there's a formular at the right to change properties of items and add remove change sub-objects in a data-grid.

I really need to progress on that topic.

Kind regards.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>