Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListView.PrintColumnHeaderStyle Property

Gets or sets the style applied to the printed column headers. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public Style PrintColumnHeaderStyle { get; set; }

#Property Value

Type Description
Style

The style applied to the printed column headers.

#Remarks

Target Type: TextEdit

#Example

<Window xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
    <Window.Resources>
        <Style x:Key="customPrintColumnHeaderStyle"
                TargetType="dxe:TextEdit"
                BasedOn="{StaticResource {dxgt:TableViewThemeKey ResourceKey=DefaultPrintHeaderStyle}}">
            <Setter Property="Background" Value="#FFFAB339" />
            <Setter Property="Foreground" Value="#FFFFFFFF" />
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="MinHeight" Value="40"/>
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="BorderBrush" Value="White" />
            <Setter Property="BorderThickness" Value="1" />
        </Style>
    </Window.Resources>

    <dxg:GridControl ...>
    ...
        <dxg:GridControl.View>
            <dxg:TreeListView PrintColumnHeaderStyle="{StaticResource customPrintColumnHeaderStyle}"
                              .../>
        </dxg:GridControl.View>
    </dxg:GridControl>
</Window>

Refer to the following topics for more information on how to print data:

See Also