Esempio n. 1
0
        internal FilterColumnHeaderVisualStyle GetFilterStyle(StyleType e)
        {
            ValidateStyle();

            if (EffectiveFilterStyles == null)
                EffectiveFilterStyles = new FilterColumnHeaderVisualStyles();

            if (EffectiveFilterStyles.IsValid(e) == false)
            {
                FilterColumnHeaderVisualStyle style = new FilterColumnHeaderVisualStyle();

                StyleType[] css = style.GetApplyStyleTypes(e);

                if (css != null)
                {
                    foreach (StyleType cs in css)
                    {
                        style.ApplyStyle(SuperGrid.BaseVisualStyles.FilterColumnHeaderStyles[cs]);
                        style.ApplyStyle(SuperGrid.DefaultVisualStyles.FilterColumnHeaderStyles[cs]);
                        style.ApplyStyle(GridPanel.DefaultVisualStyles.FilterColumnHeaderStyles[cs]);
                        style.ApplyStyle(FilterRowStyles[cs]);
                    }
                }

                SuperGrid.DoGetFilterColumnHeaderStyleEvent(this, e, ref style);

                if (style.Background == null || style.Background.IsEmpty == true)
                    style.Background = new Background(Color.White);

                if (style.Font == null)
                {
                    Font font = SystemFonts.DefaultFont;
                    style.Font = font;
                }

                EffectiveFilterStyles[e] = style;
            }

            return (EffectiveFilterStyles[e]);
        }
Esempio n. 2
0
 internal void StylePropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     EffectiveStyles = new ColumnHeaderVisualStyles();
     EffectiveFilterStyles = new FilterColumnHeaderVisualStyles();
 }