-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyPrintHelper.vb
26 lines (22 loc) · 876 Bytes
/
MyPrintHelper.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#Region "#MyPrintHelper"
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
#End Region ' #MyPrintHelper