예제 #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();
 }