DailyPrintStyle.TimeSlots Property
Provides access to a collection of time slots used to determine a horizontal grid in the printed schedule.
Namespace: DevExpress.XtraScheduler.Printing
Assembly: DevExpress.XtraScheduler.v18.1.dll
Declaration
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true)]
public TimeSlotCollection TimeSlots { get; }
Property Value
Type | Description |
---|---|
TimeSlotCollection | A TimeSlotCollection object. |
Remarks
The print algorithm iterates through the collection to find the first item whose interval allows the printed schedule to fit on the page. The following code specifies a 15 minute time span as the only time slot in the collection. If the printed schedule width exceeds the page width, a warning message is displayed and the printing fails.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/printing-how-to-customize-default-print-styles-t147965
class MyDailyPrintStyle : DevExpress.XtraScheduler.Printing.DailyPrintStyle
{
public MyDailyPrintStyle()
: base(false) {
// Print information on appointments which do not fall in the PrintTime interval.
base.PrintAllAppointments = true;
// Hide the reference mini-calendar.
base.CalendarHeaderVisible = false;
// Do not use time slots displayed in the Day view of the SchedulerControl.
base.UseActiveViewTimeScale = false;
// Determine the row height (specify the time interval of a time slot).
base.TimeSlots.Clear();
base.TimeSlots.Add(TimeSpan.FromMinutes(15), "15Minutes");
// Specify the time interval to print.
base.PrintTime = new DevExpress.XtraScheduler.TimeOfDayInterval(TimeSpan.FromHours(12), TimeSpan.FromHours(14));
}
protected override string DefaultDisplayName
{
get
{
return "My Daily Style";
}
}
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TimeSlots 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.