tags:

views:

108

answers:

2

I am looking for a good tutorial / explanation 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!

+1  A: 

The build-in settings file is a good place to store common things like window size, theme, etc... (Stuff the user do not enter them selfs... 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 a example of a medium sized MVVM app using the setting file!

rudigrobler
thanks for the comment and link. I like how the properties bind directly to the xaml in the example. I did not find a clear design pattern to implement the custom settings file. Should the settings file be a singleton? and where is the file generally kept etc...
dnndeveloper
A: 

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.

jbe
Thank for the link, I have looked at waf before - looks great but the settings aspect of the sample did not clearly standout to me.
dnndeveloper