Skip to main content

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.v24.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();
See Also