Skip to main content

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

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