SchedulerControl.ActivePrintStyle Property
Gets or sets the print style selected to print the scheduler data using printing library.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v24.1.dll
NuGet Package: DevExpress.Win.Scheduler
Declaration
Property Value
Type | Description |
---|---|
SchedulerPrintStyle | A SchedulerPrintStyle object which represents the print style used to print the scheduler’s data. |
Remarks
The ActivePrintStyle property allows you to get or set an object which contains all the information on how the scheduler’s data will be printed using printing library.
Note
This property always returns the style currently used to print the scheduler’s data. This means that if the ActivePrintStyle property is set to null (Nothing in Visual Basic), then this property will return the style specified via the SchedulerOptionsPrint.PrintStyle property of the scheduler’s SchedulerControl.OptionsPrint. A collection of all the print styles which can be used to print the scheduler’s data can be accessed via the SchedulerControl.PrintStyles property.
Example
This code snippet obtains the DailyPrintStyle from the SchedulerControl.PrintStyles collection, changes its print color scheme to Grayscale and the page orientation to Landscape and subsequently specifies the modified style as the default print style. To verify changes, you are prompted to invoke the Print Preview window using the command button in the Ribbon UI.
DailyPrintStyle printStyle = (DailyPrintStyle)schedulerControl1.PrintStyles[SchedulerPrintStyleKind.Daily];
printStyle.ColorConverter = PrintColorConverter.GrayScaleColor;
printStyle.PageSettings.Landscape = true;
schedulerControl1.ActivePrintStyle = printStyle;
MessageBox.Show("Click Print Preview to show the printout using the customized DailyPrintStyle.", "Info");