Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SchedulerControl.ShowPrintPreview() Method

Opens the Print Preview window for the Scheduler control.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

NuGet Package: DevExpress.Win.Scheduler

#Declaration

public void ShowPrintPreview()

#Remarks

The Print Preview window displays the scheduler as it will appear when it’s printed. The scheduler can be previewed and printed only if the XtraPrinting Library is available. To verify that printing and previewing the scheduler is possible, use the SchedulerControl.IsPrintingAvailable property.

PrintPreview

The Print Preview dialog allows you to print the Scheduler control, or save it as PDF or image.

To specify print options, invoke the Page Setup Dialog, modify SchedulerControl.PrintStyles or create a custom SchedulerPrintStyle.

#Example

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";
        }
    }
}
See Also