Back to Devexpress

DataViewBase.PrintCellStyle Property

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-5cbd4b3a.md

latest3.1 KB
Original Source

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.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 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

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">                    
    <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

PrintCellStyle

Printing and Exporting

Appearance Customization

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace