public SettingsWindow(AppSettings settings) { _settings = settings; InitializeComponent(); vm = new SettingsViewModel(); vm.PropertyChanged += Vm_PropertyChanged; ViewModelMapper.SettingsViewModel(_settings, vm); var appTheme = ThemeManager.Current.DetectTheme(Application.Current); vm.SelectedColor = appTheme.ColorScheme; vm.UseDarkMode = appTheme.BaseColorScheme == "Dark"; this.DataContext = vm; }