Skip to main content

SchedulerControl.SchedulerPrintAdapter Property

Provides access to the print adapter comprising scheduler data for a report. This is a dependency property.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v24.2.dll

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

public SchedulerPrintAdapter SchedulerPrintAdapter { get; }

Property Value

Type Description
SchedulerPrintAdapter

A SchedulerPrintAdapter object that is the target print adapter.

Example

This code snippet contains the PrintScheduler method which performs the following tasks:

  • Instantiate the XtraSchedulerReport descendant. The class can be designed in Visual Studio or loaded from a template.
  • Specify the time interval of the report’s scheduler data.
  • Connect the SchedulerPrintAdapter to the report instance.
  • Call the PrintHelper.ShowPrintPreview method to create a document and display it using the built-in document preview window.

View Example

using DevExpress.Mvvm;
using DevExpress.Xpf.Printing;
using DevExpress.Xpf.Printing.Native;
using DevExpress.Xpf.Scheduling;
using DevExpress.XtraPrinting.Native;
using System.Windows;

namespace PrintingExample {
    public static class MyPrintHelper {
        public static Window mainWindow { get; set; }

        public static void PrintScheduler(SchedulerControl scheduler) {
            XtraSchedulerReport1 report = new XtraSchedulerReport1();
            DateTimeRange dateTimeRange = scheduler.VisibleIntervals[0];
            scheduler.SchedulerPrintAdapter.DateTimeRange = dateTimeRange;
            scheduler.SchedulerPrintAdapter.AssignToReport(report);
            PrintHelper.ShowPrintPreview(mainWindow, report);
        }
    }
}
See Also