wpf-devexpress-dot-xpf-dot-scheduling-dot-schedulercontrol-65f8e53a.md
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.v25.2.dll
NuGet Package : DevExpress.Wpf.Scheduling
public SchedulerPrintAdapter SchedulerPrintAdapter { get; }
Public ReadOnly Property SchedulerPrintAdapter As SchedulerPrintAdapter
| Type | Description |
|---|---|
| SchedulerPrintAdapter |
A SchedulerPrintAdapter object that is the target print adapter.
|
This code snippet contains the PrintScheduler method which performs the following tasks:
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);
}
}
}
Imports DevExpress.Mvvm
Imports DevExpress.Xpf.Printing
Imports DevExpress.Xpf.Printing.Native
Imports DevExpress.Xpf.Scheduling
Imports DevExpress.XtraPrinting.Native
Imports System.Windows
Namespace PrintingExample
Public NotInheritable Class MyPrintHelper
Private Sub New()
End Sub
Public Shared Property mainWindow() As Window
Public Shared Sub PrintScheduler(ByVal scheduler As SchedulerControl)
Dim report As New XtraSchedulerReport1()
Dim dateTimeRange As DateTimeRange = scheduler.VisibleIntervals(0)
scheduler.SchedulerPrintAdapter.DateTimeRange = dateTimeRange
scheduler.SchedulerPrintAdapter.AssignToReport(report)
PrintHelper.ShowPrintPreview(mainWindow, report)
End Sub
End Class
End Namespace
See Also