public static FormatColumnsResponse ShowFormatColumnsDialog()
        {
            var dialog = new FormatWindow();

            dialog.ShowDialog();

            return(dialog.DataContext == null ? null : (dialog.DataContext as FormatColumnsDialogViewModel).Response);
        }
Beispiel #2
0
        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);
            }
        }