Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to style gridsplitter as fine line

$
0
0

Hello,

I want to style gridsplitter as fine line , following is my template , which is not very use full for this purpose

 <Style x:Key="GridSplitterPreviewStyle">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Fill="#80000000"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type GridSplitter}">
        <Setter Property="Background"
                Value="{DynamicResource BorderBrush}"/>
        <Setter Property="PreviewStyle" Value="{StaticResource GridSplitterPreviewStyle}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GridSplitter}">
                    <Border BorderBrush="{TemplateBinding Background}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            CornerRadius="0">
                        
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


Sincerely, dhampall Please remember to mark the replies as answers if they help and unmark them if they provide no help.



Viewing all articles
Browse latest Browse all 18858

Trending Articles



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