mwolfe02
/
how-to-create-a-scheduling-application-which-uses-custom-editing-and-recurrence-dialog-t545486
Public
forked from DevExpress-Examples/wpf-scheduler-specify-custom-edit-and-recurrence-dialogs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
77 lines (75 loc) · 3.63 KB
/
MainWindow.xaml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<dx:ThemedWindow
x:Class="CustomMvvmFormWithRecurrenceExample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduling"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:local="clr-namespace:CustomMvvmFormWithRecurrenceExample"
Height="600"
Width="850"
DataContext="{dxmvvm:ViewModelSource local:MainViewModel}"
Title="MainWindow">
<Grid>
<dxsch:SchedulerControl
x:Name="Scheduler"
ActiveViewIndex="0"
GroupType="Resource">
<dxsch:DayView
x:Name="dayView"
DayCount="3"
ResourcesPerPage="3"
ShowAllDayArea="False"
ShowWorkTimeOnly="True" />
<dxsch:WorkWeekView
x:Name="workWeekView"
ResourcesPerPage="3"
ShowAllDayArea="False"
ShowWorkTimeOnly="True" />
<dxsch:WeekView
x:Name="weekView"
ResourcesPerPage="3"
ShowAllDayArea="False"
ShowWorkTimeOnly="True" />
<dxsch:MonthView/>
<!--region #WindowTypes-->
<dxsch:SchedulerControl.OptionsWindows>
<dxsch:OptionsWindows AppointmentWindowType="{x:Type local:HospitalAppointmentWindow}" RecurrenceWindowType="{x:Type local:HospitalRecurrenceWindow}" />
</dxsch:SchedulerControl.OptionsWindows>
<!--endregion #WindowTypes-->
<!--region #EventToCommand-->
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="InitNewAppointment" Command="{Binding InitNewAppointmentCommand}">
<dxmvvm:EventToCommand.EventArgsConverter>
<local:NewAppointmentInitConverter/>
</dxmvvm:EventToCommand.EventArgsConverter>
</dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<!--endregion #EventToCommand-->
<dxsch:SchedulerControl.DataSource>
<dxsch:DataSource AppointmentsSource="{Binding Appointments}" ResourcesSource="{Binding Doctors}">
<dxsch:DataSource.AppointmentMappings>
<dxsch:AppointmentMappings
AllDay="AllDay"
Id="Id"
End="EndTime"
Location="Location"
RecurrenceInfo="RecurrenceInfo"
Reminder="ReminderInfo"
ResourceId="DoctorId"
Start="StartTime"
Subject="PatientName"
Type="Type">
<dxsch:CustomFieldMapping Mapping="InsuranceNumber" Name="InsuranceNumber" />
<dxsch:CustomFieldMapping Mapping="FirstVisit" Name="FirstVisit" />
<dxsch:CustomFieldMapping Mapping="Notes" Name="Notes" />
</dxsch:AppointmentMappings>
</dxsch:DataSource.AppointmentMappings>
<dxsch:DataSource.ResourceMappings>
<dxsch:ResourceMappings Caption="Name" Id="Id" />
</dxsch:DataSource.ResourceMappings>
</dxsch:DataSource>
</dxsch:SchedulerControl.DataSource>
</dxsch:SchedulerControl>
</Grid>
</dx:ThemedWindow>