public static FormatColumnsResponse ShowFormatColumnsDialog() { var dialog = new FormatWindow(); dialog.ShowDialog(); return(dialog.DataContext == null ? null : (dialog.DataContext as FormatColumnsDialogViewModel).Response); }
private void SetFormat() { ObservableCollection <FormattingRuleDefinition> definitions = new ObservableCollection <FormattingRuleDefinition>(); foreach (FormattingRuleDefinition definition in _optionsTracker.Options.FormattingRuleDefinitions) { definitions.Add(definition.Clone()); } FormatWindow filterWindow = new FormatWindow(); filterWindow.Owner = this; filterWindow.SetCollection(definitions); if (filterWindow.ShowDialog() ?? false) { _optionsTracker.Options.FormattingRuleDefinitions = new List <FormattingRuleDefinition>(definitions); } }
private void EditFormatButton_Click(object sender, RoutedEventArgs e) { var editWindow = new FormatWindow(SpellContainer); editWindow.Show(); }