Back to Devexpress

ColumnBase.PrintCellStyle Property

wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-f49e3ad0.md

latest2.8 KB
Original Source

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.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

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

Property Value

TypeDescription
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:

xaml
<!--
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

ColumnBase Class

ColumnBase Members

DevExpress.Xpf.Grid Namespace