Where is DataGridHeaderBorder for WPF DataGrid?

Possible duplicate:
WPF4 xaml-style DataGridHeaderBorder

I found several styles for WPF DataGrid online, and all of them are for pre-release DataGrid. Now, I am using the .NET4 DataGrid, I received a compilation error complaining that the DataGridHeaderBorder was not found. Based on Microsoft, it is located in the Microsoft.Windows.Themes namespace. No matter what I try, I can not get it to work.

+3
source share
2 answers

, .NET4 . . , :

xmlns:dg="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">

, PresentationFramework.Aero .

+7

.. ( )

<Style x:Key="Consulta_Grilla_HeaderStyle" TargetType="{x:Type DataGridColumnHeader}"  >
    <Style.Resources>
        <Style TargetType="{x:Type Grid}" >
            <Setter Property="TextBlock.Foreground" Value="Yellow"/>      
        </Style>
    </Style.Resources>
</Style>
0

Source: https://habr.com/ru/post/1767788/


All Articles