private void PrepareCollection(StyleOptionCollection opsCollection)
 {
     if (opsCollection != null)
     {
         PrimaryStyleCollection            = opsCollection;
         OptionsCollection                 = opsCollection.Clone();
         OptionsCollection.ValidateHandler = expression => NewExpressionString.EqIgnoreCase(expression) ? StringResources.StyleOptionConditionNotDefined : null;
     }
 }
        public StyleOptionCollection Clone()
        {
            var result = new StyleOptionCollection {
                ColumnInfo = ColumnInfo
            };

            for (var i = 0; i < Count; i++)
            {
                var item = this[i].Clone();
                item.Parent = result;
                result.Add(item);
            }
            return(result);
        }
        public ConditionalFormattingWindow(GridDataViewBase view, StyleOptionCollection opsCollection, bool useOldConditionalFormatting = false)
        {
            View = view;
            _useOldConditionalFormatting = useOldConditionalFormatting;
            InitializeComponent();
            ThresholdVisibility            = Visibility.Collapsed;
            LayoutItemVisibility           = Visibility.Visible;
            ApplyToRowVisibility           = Visibility.Visible;
            PredefinedFormatNameVisibility = Visibility.Collapsed;
            PrepareCollection(opsCollection);
            InternalEditorsInit();
            ApplyButtonsThemes();

            Loaded += OnLoaded;
            Closed += OnClosed;
            LayoutRoot.DataContext = this;
        }
 public TreeListViewExpressionColumnBehavior()
 {
     StylesCollection = new StyleOptionCollection();
     StylesCollection.CollectionChanged += StylesCollection_CollectionChanged;
     IsLoading = true;
 }
 public TableViewExpressionColumnBehavior()
 {
     StylesCollection = new StyleOptionCollection();
 }