Back to Devexpress

ColumnBase.PrintColumnHeaderStyle Property

wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-9f256791.md

latest2.9 KB
Original Source

ColumnBase.PrintColumnHeaderStyle Property

Gets or sets the style applied to the printed column’s header. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public Style PrintColumnHeaderStyle { get; set; }
vb
Public Property PrintColumnHeaderStyle As Style

Property Value

TypeDescription
Style

The style applied to the printed column’s header.

|

Remarks

Target Type : TextEdit

Example

xaml
<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.Columns>
            <dxg:GridColumn FieldName="FullName" 
                            PrintColumnHeaderStyle="{StaticResource customPrintColumnHeaderStyle}"/>
            ...
        </dxg:GridControl.Columns>
    </dxg:GridControl>
</Window>

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

See Also

Appearance Customization

ColumnBase Class

ColumnBase Members

DevExpress.Xpf.Grid Namespace