Control states persistency
Posted: 21 Feb 2023, 12:51
We're currently looking into a solution to automatically persist (serialize) control states (dependency properties) for dialogs. For example we want some controls on a dialog to resume their states (size, expanded state, ListView's column width etc) when reopening the dialog. The generic requirements are:
- The solution should provide a way to markup persistable control properties
- It should be extensible to all dialogs (no specific serialization codes for each dialog)
- The serialization should be done automatically (e.g. automatic serialize/deserialize on dialog closing/loading)
- It uses UIElement.PersisId property which is marked obsolete in WPF
- It utilizes logical tree path to generate a unique Id, but some control elements may not appear in logical tree (e.g. GridViewColumn)