/
MainWindow.xaml
57 lines (57 loc) · 3.91 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
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduling"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
Title="DXScheduler" Height="600" Width="800"
DataContext="{dxmvvm:ViewModelSource local:RestrictionsViewModel}">
<Grid>
<!--region #main-->
<dxsch:SchedulerControl Name="schedulerControl1"
CommandBarStyle="Ribbon"
GroupType="Resource"
AllowAppointmentConflicts="False"
AllowAppointmentCreate="False"
AllowReminders="False"
FirstDayOfWeek="Monday"
CustomAllowAppointmentConflicts="schedulerControl1_CustomAllowAppointmentConflicts"
CustomAllowAppointmentCreate="schedulerControl1_CustomAllowAppointmentCreate">
<!--endregion #main-->
<dxsch:DayView x:Name="dayView1" ResourcesPerPage="2" ShowWorkTimeOnly="True"/>
<dxsch:SchedulerControl.DataSource>
<dxsch:DataSource AppointmentsSource="{Binding Appointments}" ResourcesSource="{Binding Resources}">
<dxsch:DataSource.AppointmentMappings>
<dxsch:AppointmentMappings AllDay="AllDay"
Id="Id"
Description="Description"
End="EndTime"
LabelId="LabelKey"
Location="Location"
RecurrenceInfo="RecurrenceInfo"
Reminder="ReminderInfo"
Start="StartTime"
StatusId="StatusKey"
Subject="Subject"
TimeZoneId="TimeZoneId"
Type="Type"/>
</dxsch:DataSource.AppointmentMappings>
<dxsch:DataSource.ResourceMappings>
<dxsch:ResourceMappings Caption="Caption" Id="Id"/>
</dxsch:DataSource.ResourceMappings>
</dxsch:DataSource>
</dxsch:SchedulerControl.DataSource>
<dxsch:SchedulerControl.RibbonActions>
<dxb:InsertAction ContainerName="{x:Static dxsch:DefaultBarItemNames.Pages_Home}" Index="6">
<dxr:RibbonPageGroup Caption="Restrictions">
<dxb:BarCheckItem x:Name="barCheckItem1" Content="Disable Creating Appointments" RibbonStyle="Large" LargeGlyph="{dx:DXImage Image=Cancel_32x32.png}" CheckedChanged="BarButtonItem_ItemClick"/>
<dxb:BarCheckItem x:Name="barCheckItem2" Content="Disable Appointment Conflicts" RibbonStyle="Large" LargeGlyph="{dx:DXImage Image=Cancel_32x32.png}" CheckedChanged="barCheckItem2_CheckedChanged"/>
</dxr:RibbonPageGroup>
</dxb:InsertAction>
</dxsch:SchedulerControl.RibbonActions>
</dxsch:SchedulerControl>
</Grid>
</Window>