开发者

MVVM WPF save and load user settings design pattern

I am looking for a good tutorial / explanatio开发者_如何学JAVAn that shows where and how to implement settings in a MVVM WPF application. I understand .net has built-in support for settings but is this typically used for medium to larger size applications? What are the alternatives?

I am thinking of storing many user settings such as window size, grid column size, font size, font, etc...

Thank you for the help!


The built-in settings file is a good place to store common things like window size, theme, etc... (Stuff the user does not enter themselves... ambient state) but for more advanced settings that the user can customize, I would rather build my own... This gives me better control over how and where it gets stored! Also check out this article for an example of a medium sized MVVM app using the settings file!


You might be interested in the Writer sample application of the WPF Application Framework (WAF). It shows how to use the Settings in a WPF MVVM application.

This approach should be sufficient for the properties you like to store.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜