SpreadsheetPrintOptions.PrintContent Property
Specifies spreadsheet content to print/display within the Print Preview.
Namespace: DevExpress.Xpf.Spreadsheet
Assembly: DevExpress.Xpf.Spreadsheet.v24.2.dll
NuGet Package: DevExpress.Wpf.Spreadsheet
#Declaration
public SpreadsheetPrintContent PrintContent { get; set; }
#Property Value
Type | Description |
---|---|
Spreadsheet |
An enumeration member that specifies spreadsheet content to print. |
Available values:
Name | Description |
---|---|
Default | The default value (that is Entire |
Active |
Prints the active sheet and all selected sheets (if any). To print multiple sheets, hold Ctrl while you click sheet tabs in the control. |
Entire |
Prints the entire workbook. |
Selection | Prints selected cells of the active worksheet. If a chart sheet is active, it is printed completely. |
#Property Paths
You can access this nested property as listed below:
Object Type | Path to Print |
---|---|
Spreadsheet |
|
#Remarks
Use the PrintContent property to specify what to print in the Spreadsheet control.
You can set this property to one of the following values:
Default - default value (= EntireWorkbook).
EntireWorkbook - prints the entire workbook.
ActiveSheets - prints the active sheet and all selected sheets (if any). To print multiple sheets, hold Ctrl when you click sheet tabs in the control.
Selection - prints selected cells of the active worksheet. If a chart sheet is active, it is printed completely.
The following example specifies that the Spreadsheet control should print only selected sheets.
<dxsps:SpreadsheetControl CommandBarStyle="Ribbon" ShowStatusBar="True" ShowFormulaBar="True" Name="spreadsheetControl">
<dxsps:SpreadsheetControl.Options>
<dxsps:SpreadsheetControlOptions>
<dxsps:SpreadsheetControlOptions.Print>
<dxsps:SpreadsheetPrintOptions PrintContent="ActiveSheets"/>
</dxsps:SpreadsheetControlOptions.Print>
</dxsps:SpreadsheetControlOptions>
</dxsps:SpreadsheetControl.Options>
</dxsps:SpreadsheetControl>