DefaultPrintDialogRunner.Run(PrintDocument, UserLookAndFeel, IWin32Window, PrintDialogAllowFlags) Method
Invokes a customized Print dialog.
Namespace: DevExpress.XtraPrinting.Preview
Assembly: DevExpress.XtraPrinting.v24.2.dll
NuGet Package: DevExpress.Win.Printing
#Declaration
public override DialogResult Run(
PrintDocument document,
UserLookAndFeel lookAndFeel,
IWin32Window owner,
PrintDialogAllowFlags flags
)
#Parameters
Name | Type | Description |
---|---|---|
document | Print |
|
look |
User |
|
owner | IWin32Window | An object implementing the IWin32Window interface that is the dialog owner. |
flags | Print |
A Print |
#Returns
Type | Description |
---|---|
Dialog |
A Dialog |
#Remarks
The following image illustrates the Print dialog invoked by this method as an alternative to the standard PrintDialog that is returned by the SystemPrintDialogRunner.Run method.
#Example
To make the PrintTool.PrintDialog method invoke the standard system Print dialog, add the following code to the application’s Program.cs unit (Program.vb in Visual Basic).
This will replace the DefaultPrintDialogRunner, returned by the PrintDialogRunner.Instance property, with a SystemPrintDialogRunner.
using DevExpress.XtraPrinting.Preview;
// ...
static void Main(string[] args) {
PrintDialogRunner.Instance = new SystemPrintDialogRunner();
// ...
}