Where to store general application settings

I want to transfer the parameters of my application from XAML to the configuration file. For example, tooltips and content lines for buttons / flags and shortcuts. Is this a ResourceDictionary task, or should I use the App.Config or Settings.settings file?

Tooltip and content strings are actually not for every user, they are more applications and can change if the interface is international.

EDIT: I hear using the Resource Dictionary or use App.Config , what's the difference?

Thanks!

0
source share
3 answers

Tips and toolbars are rarely the "settings" of applications, but rather belong to your application and are distributed with it. I think ResourceDictionary is the best place for such a thing.

+2
source

I agree with @Johannes Rossel about tooltips and toolbars. App.Config is the preferred way to store things like the default document directory, checkbox states that you want to save. Things that this user can change during normal operation of the program, which should be saved in all starts.

0
source

I absolutely agree that the lines for labels / buttons / something should not be stored in the settings, but in the resource files. Since you mentioned internationalization, I highly recommend this WPF Localization Guide document , which compares several approaches to localizing in a very detailed way, including the method suggested by Microsoft (using LocBaml.exe), which (in my opinion) is completely unsuitable .

The localization strategy solution also determines where you should store your resource strings. Therefore, perhaps you should first make this decision.

0
source

Source: https://habr.com/ru/post/1344530/


All Articles