Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

ColumnFilterEditor Styling

$
0
0

Hello,
I tried to style the ColumnFilterEditor control (setting background, border, etc.) – but after some experiments I came to the conclusion, that this is close to impossible….

Lots of ColumnFilterEditor’s properties are "inherited" (actually they are COPIED) from the parent grid.

This is how I tried to define the style:

    <Style TargetType="c1:ColumnFilterEditor" x:Key="ColumnFilterEditorStyle">
        <Setter Property="Background" Value="Green" />
        <Setter Property="BorderBrush" Value="Black" />
        <Setter Property="BorderThickness" Value="5" />
    </Style>

    <Style TargetType="c1:ColumnFilterEditor" BasedOn="{StaticResource ColumnFilterEditorStyle}" />

which does not work, unless I do this in the "EditorOpened" event:

        private void C1FlexGridFilter_EditorOpened(object sender, EventArgs e)
        {
            C1FlexGridFilter cfe = sender as C1FlexGridFilter;
            if (cfe != null && cfe.Editor != null)
            {
                cfe.Editor.ClearValue(ColumnFilterEditor.BackgroundProperty);
                //clear other values that should be styled…
            }
        }

We try to make a very clean style, without grid-lines, header-lines, etc. – but this does not work well for the filterpopup – cause this should have a border….and this border’s color is the FlexGrid’s "HeaderGridLinesBrush"…
(This "easy styling" is killing me….it sure is easy, but unflexible like hell as well….)

Regards
Johannes


Viewing all articles
Browse latest Browse all 14170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>