Skip to main content

DataViewBase.PrintCellStyle Property

Gets or sets the style applied to all data 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.v23.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public Style PrintCellStyle { get; set; }

Property Value

Type Description
Style

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

Remarks

Target Type: TextEdit

View Example: Customize the Appearance of Printed/Exported Information

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">                    
    <dxg:GridControl ...>
    ...
        <dxg:GridControl.View>
            <dxg:TreeListView ...>
                <dxg:TreeListView.PrintCellStyle>
                    <Style TargetType="dxe:TextEdit" 
                           BasedOn="{StaticResource {dxgt:TableViewThemeKey ResourceKey=DefaultPrintCellStyle}}">
                        <Setter Property="Background" Value="LightGray"/>
                        <Setter Property="FontWeight" Value="Bold"/>
                        <Setter Property="BorderThickness" Value="0"/>
                    </Style>
                </dxg:TreeListView.PrintCellStyle>
            </dxg:TreeListView>
        </dxg:GridControl.View>
    </dxg:GridControl>
</Window>

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

See Also