Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

MVVM WPF Global Settings

$
0
0

I have tried to find info on the following but failed miserably.

In my project, I wan the user to choose (Via File/Settings Menu and a seperate window, the location for certain files.

ie. Data files for section 1 will be in c:\sec1 for section2 will be in c:\sect2 etc. Database will be TEST or PROD

These file location will remain the same 90% of the time BUT occassionally will change or be used to run tests in another environment (TEST or PROD).

in C# we used to use global variables or user settings but everyone keeps telling me to use my own XML files to store user settings etc.
How do I store these settings, allowing the user to change them (via na XAML Window) depending on their individual machine specifics (usually network paths) and be able to access these variables throughout the application.

Do we use the same MVVM model for this or is this not suited to MVVM.

Thanks


Viewing all articles
Browse latest Browse all 18858


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>