I am trying to create a preference window for users, which they can manipulate (change preferences).
I want to implement it in a proper way so do you have any suggestions for a good code architecture? By the way I am using the MVVM pattern for C# with WPF.
Like, using a preferences class in which all settings will be saved… or something like that.
Thank you
I encourage you to use some kind of MVVM framework.
Below I am presenting solution with MVVM Light – free MVVM framework.
public RelayCommand CreateOptionsWindowCommand
{
get; private set;
}
in your ctor
and function:
All bindings in your new options window are binding now to OptionsViewModel.
To retrieve options and data you saved in OptionsWindow to your MainViewModel you can use Messanging implemented in MVVM Light. Messanging is used to communicate between classes.