DataGrid Gripper风格

时间:2016-01-20 14:35:41

标签: wpf wpfdatagrid

我想将行标题抓取器样式设置为类似于列标题样式 怎么做?

我希望标题看起来像这样:

<Style x:Key="dataGridColumnHeaderStyle" TargetType="{x:Type toolkit:DataGridColumnHeader}">
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="Height" Value="34"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Padding" Value="5,0,5,0" />
        <Setter Property="Background" Value="{StaticResource clalBlueGlossyGradientEffect}" />
        <Setter Property="BorderBrush" Value="White" />
        <Setter Property="BorderThickness" Value="1, 0, 0, 0" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />        
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock  TextWrapping="Wrap" Text="{Binding}"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>        
    </Style>

0 个答案:

没有答案