Skip to main content
A newer version of this page is available. .

DailyPrintStyle.UseActiveViewTimeScale Property

Gets or sets whether the scheduler attempts to use the DayView.TimeScale value to determine the horizontal grid lines printed in the schedule .

Namespace: DevExpress.XtraScheduler.Printing

Assembly: DevExpress.XtraScheduler.v19.2.dll

Declaration

[DefaultValue(false)]
[XtraSerializableProperty(XtraSerializationFlags.DefaultValue)]
public bool UseActiveViewTimeScale { get; set; }

Property Value

Type Default Description
Boolean **false**

true, to use the time scale of the scheduler view to determine the time scale in the printout; otherwise, false.

Remarks

When the UseActiveViewTimeScale is set to true, the print algorithm attempts to set the DayView.TimeScale value as the time scale of the view being printed. If the printed schedule exceeds the page height, the method iterates over the DailyPrintStyle.TimeSlots collection to find a time scale for which the printout fits the page.

To reduce the height of the printout so that the printed schedule uses the time scale of the active scheduler view, adjust the print style as follows:

The following code sample illustrates the use of the UseActiveViewTimeScale property.

Example

DailyPrintStyle printStyle = (DailyPrintStyle)schedulerControl1.PrintStyles[SchedulerPrintStyleKind.Daily];
printStyle.UseActiveViewTimeScale = true;
printStyle.PrintTime.Start = schedulerControl1.SelectedInterval.Start.TimeOfDay;
printStyle.PrintTime.End = schedulerControl1.SelectedInterval.End.TimeOfDay;
if ((this.schedulerControl1.DayView.TimeScale.Hours < 1) || (printStyle.PrintTime.Duration.TotalHours > 4))
{
    printStyle.CalendarHeaderVisible = false;
    printStyle.AutoScaleHeadingsFont = false;
    printStyle.HeadingsFont = new Font("Verdana", 8);
    printStyle.AppointmentFont = new Font("Verdana", 8);
}
schedulerControl1.ShowPrintPreview(printStyle);
schedulerControl1.PrintStyles.LoadDefaults();

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UseActiveViewTimeScale property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also