예제 #1
0
        private void Properties_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var window = new SettingsWindow();

            window.Owner = this;
            window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            bool?result = window.ShowDialog();

            if (result.GetValueOrDefault(false))
            {
                // User pressed save, so we should re-init things.
                _viewModel.SettingsChanged();
            }
        }
예제 #2
0
        private void Properties_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var window = new SettingsWindow
            {
                Owner = this,
                WindowStartupLocation = WindowStartupLocation.CenterOwner
            };

            if (window.ShowDialog() == true)
            {
                // User pressed save, so we should re-init things.
                _viewModel.SettingsChanged();
            }
        }
예제 #3
0
 private void Properties_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     var window = new SettingsWindow();
     window.Owner = this;
     window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
     bool? result = window.ShowDialog();
     if (result.GetValueOrDefault(false))
     {
         // User pressed save, so we should re-init things.
         _viewModel.SettingsChanged();
     }
 }