Class PrintPreviewAreaControl
Represents a control that displays the print preview of SfDataGrid content that is ready for printing operation.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Grid
Assembly: Syncfusion.SfGrid.WPF.dll
Syntax
public class PrintPreviewAreaControl : Control, INotifyPropertyChanged, IDisposable
Constructors
PrintPreviewAreaControl()
Initializes a new instance of PrintPreviewAreaControl class.
Declaration
public PrintPreviewAreaControl()
Fields
PageIndexProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PageIndex dependency property.
Declaration
public static readonly DependencyProperty PageIndexProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PageIndex dependency property.
PrintHeaderRowHeightProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintHeaderRowHeight dependency property.
Declaration
public static readonly DependencyProperty PrintHeaderRowHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintHeaderRowHeight dependency property.
PrintOrientationProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintOrientation dependency property.
Declaration
public static readonly DependencyProperty PrintOrientationProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintOrientation dependency property.
PrintPageFooterHeightProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageFooterHeight dependency property.
Declaration
public static readonly DependencyProperty PrintPageFooterHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageFooterHeight dependency property.
PrintPageFooterTemplateProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageFooterTemplate dependency property.
Declaration
public static readonly DependencyProperty PrintPageFooterTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageFooterTemplate dependency property.
PrintPageHeaderHeightProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageHeaderHeight dependency property.
Declaration
public static readonly DependencyProperty PrintPageHeaderHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageHeaderHeight dependency property.
PrintPageHeaderTemplateProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageHeaderTemplate dependency property.
Declaration
public static readonly DependencyProperty PrintPageHeaderTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageHeaderTemplate dependency property.
PrintPageHeightProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageHeight dependency property.
Declaration
public static readonly DependencyProperty PrintPageHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageHeight dependency property.
PrintPageMarginProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageMargin dependency property.
Declaration
public static readonly DependencyProperty PrintPageMarginProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageMargin dependency property.
PrintPageWidthProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageWidth dependency property.
Declaration
public static readonly DependencyProperty PrintPageWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintPageWidth dependency property.
PrintRowHeightProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintRowHeight dependency property.
Declaration
public static readonly DependencyProperty PrintRowHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintRowHeight dependency property.
PrintScaleOptionProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintScaleOption dependency property.
Declaration
public static readonly DependencyProperty PrintScaleOptionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.PrintScaleOption dependency property.
ZoomFactorProperty
Identifies the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.ZoomFactor dependency property.
Declaration
public static readonly DependencyProperty ZoomFactorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.PrintPreviewAreaControl.ZoomFactor dependency property.
Properties
FirstCommand
Gets the command to navigate first page in print document.
Declaration
public BaseCommand FirstCommand { get; }
Property Value
Type |
---|
BaseCommand |
LastCommand
Gets the command to navigate last page in print document.
Declaration
public BaseCommand LastCommand { get; }
Property Value
Type |
---|
BaseCommand |
NextCommand
Gets the command to navigate next page in print document.
Declaration
public BaseCommand NextCommand { get; }
Property Value
Type |
---|
BaseCommand |
PageIndex
Gets or sets the index of the page.
Declaration
public int PageIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An index of the page. The default index is 1. |
PreviousCommand
Gets the command to navigate previous page in print document.
Declaration
public BaseCommand PreviousCommand { get; }
Property Value
Type |
---|
BaseCommand |
PrintCommand
Gets the command to invoke the print process in SfDataGrid.
Declaration
public BaseCommand PrintCommand { get; }
Property Value
Type |
---|
BaseCommand |
PrintHeaderRowHeight
Gets or sets the height of header row in SfDataGrid for printing.
Declaration
public double PrintHeaderRowHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the header row in SfDataGrid. |
PrintManagerBase
Gets or sets an instance of the PrintManagerBase which manages the printing operation in SfDataGrid.
Declaration
public PrintManagerBase PrintManagerBase { get; set; }
Property Value
Type | Description |
---|---|
PrintManagerBase | An instance of the PrintManagerBase class. |
Remarks
PrintManagerBase class provides various properties and virtual methods to customize its operations.
PrintOrientation
Gets or sets the PrintOrientation that indicates whether the documents are printed in portrait or landscape mode.
Declaration
public PrintOrientation PrintOrientation { get; set; }
Property Value
Type | Description |
---|---|
PrintOrientation | One of the PrintOrientation enumeration that specifies the orientation for printing. The default value is Portrait. |
PrintPageFooterHeight
Gets or sets the height of the page footer for printing.
Declaration
public double PrintPageFooterHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the page footer. |
PrintPageFooterTemplate
Gets or sets System.Windows.DataTemplate that defines the visual representation of the page footer for printing.
Declaration
public DataTemplate PrintPageFooterTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The object that defines the visual representation of the page footer. The default is null. |
PrintPageHeaderHeight
Gets or sets the height of the page header for printing.
Declaration
public double PrintPageHeaderHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the page header. |
PrintPageHeaderTemplate
Gets or sets System.Windows.DataTemplate that defines the visual representation of the page header for printing.
Declaration
public DataTemplate PrintPageHeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The object that defines the visual representation of the page header. The default is null. |
PrintPageHeight
Gets or sets the height of a page for printing.
Declaration
public double PrintPageHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of a page for printing. |
PrintPageMargin
Gets or sets the margin of page for printing.
Declaration
public Thickness PrintPageMargin { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Thickness | The Thickness of page for printing. |
PrintPageWidth
Gets or sets the width of a page for printing.
Declaration
public double PrintPageWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of a page for printing. |
PrintRowHeight
Gets or sets the height of DataRow in SfDataGrid for printing.
Declaration
public double PrintRowHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the DataRow in SfDataGrid. |
PrintScaleOption
Gets or sets the PrintScaleOptions that indicates the number of rows or columns are scaled to fit the page when it is printed.
Declaration
public PrintScaleOptions PrintScaleOption { get; set; }
Property Value
Type | Description |
---|---|
PrintScaleOptions | One of the PrintScaleOptions enumeration that specifies how the rows or columns are scaled to fit the page. The default value is NoScaling. |
QuickPrintCommand
Gets the command to invoke the quick print process in SfDataGrid.
Declaration
public BaseCommand QuickPrintCommand { get; }
Property Value
Type |
---|
BaseCommand |
TotalPages
Gets the total number of pages that the document contains for printing.
Declaration
public int TotalPages { get; }
Property Value
Type |
---|
System.Int32 |
ZoomFactor
Gets or sets a value that indicates how large the pages will appear.
Declaration
public double ZoomFactor { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A value indicating how large the pages will appear. The default zoom factor is 100.0. |
Methods
Dispose()
Releases all the resources used by the PrintPreviewAreaControl class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the PrintPreviewAreaControl class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. |
OnApplyTemplate()
Builds the visual tree for the PrintPreviewAreaControl when a new template is applied.
Declaration
public override void OnApplyTemplate()
Events
PropertyChanged
Occurs when a property value changes in PrintPreviewAreaControl class.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
---|
System.ComponentModel.PropertyChangedEventHandler |