Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2150
WPF XamGrid and Persistence Framework Strategy
posted

Is there anywhere I can go to get some elaboration on the behavior of the XamGrid in conjunction with your Persistence Framework?

Reading the code for myself would be the best.  Short of that, some form of reader's digest version may help me.

My understanding is that the Persistence Framework is generally based on a "brute force" dumping of all serializable properties in the memory of the object(S) selected.  There is also some support for filtering those properties by their names (and/or "paths").  However I've found that the XamGrid also uses some "smarts" to pick between a couple different variations of this persistence strategy.

In some cases during a load operation, the XamGrid reuses the existing columns (ColumnBase) and their instances remain the same in memory, despite a Persistence Framework deserialization (load) operation.  In other scenarios the load operation uses a different strategy (I call it the "slam-dunk" approach) whereby it *clears* *out* the old column instances and rebuilds an entire collection of new columns from scratch, replacing the old ones.  I'd like to know,

  • ("A") what the conditions are for using one strategy over the other,
  • and ("B") if there is a uniform/formal way to detect when one strategy is used over the other.

In particular the "slam-dunk" approach is no good and we don't have any use for it.  The approach destroys all data templates and styles (well-documented) and involves too much work to rebuild these things.  I'd only use the Persistence Framework's deserialization (load) if it could be done *without* the "slam-dunk" approach.  Otherwise the user would need to start over and reconfigure the grid from the programmer's default.

Please help.  Hopefully I'm on the right track in my understanding of the strategies for deserializing the xamGrid.  It took many hours and much trial-and-error to get this far.