Skip to main content
Tag

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

ColumnBase.PrintCellStyle Property

Gets or sets the style applied to column cells when you print the control or export it in WYSIWYG mode. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public Style PrintCellStyle { get; set; }

#Property Value

Type Description
Style

The style applied to column cells when you print the control or export it in WYSIWYG mode.

#Remarks

The PrintCellStyle property specifies the style that groups together properties, resources, and event handlers and shares them between instances of the TextEdit type.

Target Type: TextEdit

The following code sample uses brushes specified in the Color column to paint the background of Product Name cells when you print/export data:

ColumnBase PrintCellStyle

<!--
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
-->
<dxg:GridColumn FieldName="ProductName">
    <dxg:GridColumn.PrintCellStyle>
        <Style TargetType="dxe:TextEdit"
               BasedOn="{StaticResource {dxgt:TableViewThemeKey ResourceKey=DefaultPrintCellStyle}}">
            <Setter Property="Background" Value="{Binding RowData.Row.Color}"/>
        </Style>
    </dxg:GridColumn.PrintCellStyle>
</dxg:GridColumn>

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

View Example: Customize the Appearance of Printed/Exported Information

See Also