示例#1
0
        public SettingsWindow(SettingsViewModel vm)
        {
            InitializeComponent();

            VM = vm;
            this.DataContext = VM;
            VM.CloseEvent += VM_CloseEvent;
        }
示例#2
0
 /// <summary>
 /// Launches a modal dialog to allow user to change settings
 /// </summary>
 private void LaunchSettingsWindow()
 {
     var vm = new SettingsViewModel();
     var window = new SettingsWindow(vm);
     window.Owner = Application.Current.MainWindow;
     window.ShowDialog();
 }