Back to Devexpress

PrintControl.DockManager Property

windowsforms-devexpress-dot-xtraprinting-dot-control-dot-printcontrol-c06e1fd4.md

latest2.3 KB
Original Source

PrintControl.DockManager Property

Provides access to the DockManager, specifying the settings of dock panels in Print Preview.

Namespace : DevExpress.XtraPrinting.Control

Assembly : DevExpress.XtraPrinting.v25.2.dll

NuGet Package : DevExpress.Win.Printing

Declaration

csharp
[Browsable(false)]
public DockManager DockManager { get; }
vb
<Browsable(False)>
Public ReadOnly Property DockManager As DockManager

Property Value

TypeDescription
DockManager

A DockManager object.

|

Example

This example demonstrates how dock panels can be obtained in a report’s preview via the PrintControl.DockManager property.

csharp
XtraReport1 report = new XtraReport1();
report.CreateDocument();
ReportPrintTool tool = new ReportPrintTool(report);
tool.PreviewForm.Shown += PreviewForm_Shown;
// ...

void PreviewForm_Shown(object sender, EventArgs e) {
    PrintPreviewFormEx previewForm = sender as PrintPreviewFormEx;
    DevExpress.XtraBars.Docking.DockPanel paramsPanel = previewForm.PrintControl.DockManager[1];
}
vb
Dim report As New XtraReport1()
report.CreateDocument()
Dim tool As New ReportPrintTool(report)
tool.PreviewForm.Shown += PreviewForm_Shown
' ...

Private Sub PreviewForm_Shown(sender As Object, e As EventArgs)
    Dim previewForm As PrintPreviewFormEx = TryCast(sender, PrintPreviewFormEx)
    Dim paramsPanel As DevExpress.XtraBars.Docking.DockPanel = previewForm.PrintControl.DockManager(1)
End Sub

See Also

PrintControl Class

PrintControl Members

DevExpress.XtraPrinting.Control Namespace