Is there a generic way to save user layout?
I'm on a project where开发者_运维知识库 we use MVVM pattern. By user layout: Sorting order of a grid, state of window or control.
For example is it possible to serialize all WPF control layout?
AvalonDock can serialize its layout, but that won't apply for grid column widths (AvalonDock is by all means great library!).
Also, I have written a set of classes that can make any property (of serializable type) of any object (in an WPF application) persistent only via adding a [Configurable]
attribute to the property. It shouldn't be hard to customize it to save the properties based on a different criterion than presence of an attribute. But it saves the values on per-type basis, so it might be something else than you are looking for.
I can share if you wish.
精彩评论