views:

59

answers:

3

I want to move my application settings out of XAML and into a config file. For example, ToolTips and Content strings for Buttons/CheckBoxes and Labels. Is this the job of a ResourceDictionary, or should I use the App.Config or Settings.settings file?

The ToolTips and Content strings are not really per user, they are more Application wide and may change if the UI is internationalized.

EDIT: I hear use a Resource Dictionary or use a App.Config, what is the difference?

Thanks!

+2  A: 

Tool tips and strings are rarely application "settings" but rather belong to your application program itself and are distributed with it. I think a ResourceDictionary is the best place for such a thing.

Joey
@Johannes yes I tend to agree, there are so many choices, sometimes it's hard to keep them separated.
Chris
A: 

I agree with @Johannes Rossel about tool tips and strings. App.Config is the preferred way to store things like default document directory, check box states that need to be persisted. Things that that user can change in normal running of the program that should be persisted across launches.

jamone
A: 

I absolutely agree that strings for labels/buttons/whatever should not be stored in the settings, but in resource files. As you mentioned internationalization, I highly recommend this "WPF Localization Guidance" document which compares several localization approaches in a very detailed way, including the way proposed by Microsoft (using LocBaml.exe) which (in my eyes) is completely unusable.

The decision for the localization strategy also determines the place where you should store your resource strings. So maybe, you should first take this decision.

gehho