Back to Devexpress

DailyPrintStyle Class

windowsforms-devexpress-dot-xtrascheduler-dot-printing.md

latest3.8 KB
Original Source

DailyPrintStyle Class

A print style used to print the Day View.

Namespace : DevExpress.XtraScheduler.Printing

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public class DailyPrintStyle :
    PrintStyleWithAppointmentHeight
vb
Public Class DailyPrintStyle
    Inherits PrintStyleWithAppointmentHeight

Remarks

The currently active print style can be accessed via the SchedulerControl.ActivePrintStyle property. The available print styles are stored in the collection returned via the SchedulerControl.PrintStyles property.

You can customize the default daily print style or create your own style by implementing a descendant of the DailyPrintStyle class, as shown in the code below. To print a schedule using the specified print style, use the SchedulerControl.Print method.

Example

csharp
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";
        }
    }
}
csharp
SchedulerPrintStyle style = new MyDailyPrintStyle();
schedulerControl1.PrintStyles.Add(style);
schedulerControl1.ShowPrintOptionsForm();

Inheritance

Object UserInterfaceObject SchedulerPrintStyle DevExpress.XtraScheduler.Printing.PrintStyleWithDateRange DevExpress.XtraScheduler.Printing.PrintStyleWithResourceOptions DevExpress.XtraScheduler.Printing.PrintStyleWithAppointmentHeight DailyPrintStyle

See Also

DailyPrintStyle Members

Print

SchedulerPrintStyle

ShowPrintPreview

Printing

Printing and Reporting

DevExpress.XtraScheduler.Printing Namespace