
Someone asked me if WPF provides an option for storing or serializing control state. For an instance, having a ListView, is it possible to store the width of its columns after closing and opening the Window, or maybe after restarting the application? I was thinking to myself, sure, you should use Data Binding. All you have to do is to bind the width or height, of any element to a back storage. For example you can create a State class for storing the data, and then you should bind it to your properties, using the Binding markup extension. Thinking twice, I realized that it is much more complicated than it looks.
|