Home Forums WPF controls Xceed DataGrid for WPF How to style the very top row (headers) of my Grid

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23987 |

    I have been trying to do this but to no avail and I cannot find anything in the search. Can someone please help. Thanks!

    Imported from legacy forums. Posted by dvlnblk (had 525 views)

    User (Old forums)
    Member
    Post count: 23064

    You need to provide your own data template for the TitleTemplate property of each column. Alternatively you can write a TitleTemplateSelector which will require you to inherit from DataTemplateSelector.

    Columns exposes Title, TitleTemplate, and TitleTemplateSelector for header rendering.

    Trev

    Imported from legacy forums. Posted by Trevor (had 426 views)

    User (Old forums)
    Member
    Post count: 23064

    You can also try:
    <Style TargetType=”{x:Type xcdg:ColumnManagerCell}”>
    <Setter Property=”Background” Value=”#FFFFFF”/>
    <Setter Property=”BorderThickness” Value=”0″/>
    </Style>

    <Style TargetType=”{x:Type xcdg:ColumnManagerRow}”>
    <Setter Property=”AllowColumnReorder” Value=”True”/>
    <Setter Property=”MinWidth”
    Value=”{Binding RelativeSource={RelativeSource AncestorType={x:Type ScrollContentPresenter}}, Path=ActualWidth}”/>
    <Setter Property=”AllowSort” Value=”True”/>
    <Setter Property=”FontWeight” Value=”SemiBold”/>
    <Setter Property=”FontFamily” Value=”Tahoma”/>
    <Setter Property=”Foreground” Value=”White”/>
    <Setter Property=”SelectionBackground” Value=”#C5D2FB”/>
    <Setter Property=”Background” Value=”#FFFFFF”/>
    </Style>

    Imported from legacy forums. Posted by Lena (had 3166 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.