-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindow.xaml
60 lines (57 loc) · 3.46 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
<dx:ThemedWindow x:Class="DXApplication14.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:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduling"
xmlns:local="clr-namespace:DXApplication14"
Width="1000"
Height="800"
Title="MainWindow">
<dx:ThemedWindow.DataContext>
<local:MainViewModel/>
</dx:ThemedWindow.DataContext>
<DockPanel>
<dxb:MainMenuControl DockPanel.Dock="Top">
<dxb:BarButtonItem Content="Add a regular appointment">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:CompositeCommandBehavior CanExecuteCondition="AnyCommandCanBeExecuted">
<dxmvvm:CommandItem Command="{Binding AddApptCommand}"
CommandParameter="false" />
<dxmvvm:CommandItem CheckCanExecute="False"
Command="{Binding ElementName=scheduler,
Path=Commands.ShowAppointmentWindowCommand}" />
</dxmvvm:CompositeCommandBehavior>
</dxmvvm:Interaction.Behaviors>
</dxb:BarButtonItem>
<dxb:BarButtonItem Content="Add a recurrent appointment">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:CompositeCommandBehavior CanExecuteCondition="AnyCommandCanBeExecuted">
<dxmvvm:CommandItem Command="{Binding AddApptCommand}"
CommandParameter="True" />
<dxmvvm:CommandItem CheckCanExecute="False"
Command="{Binding ElementName=scheduler,
Path=Commands.ShowAppointmentWindowCommand}" />
</dxmvvm:CompositeCommandBehavior>
</dxmvvm:Interaction.Behaviors>
</dxb:BarButtonItem>
</dxb:MainMenuControl>
<dxsch:SchedulerControl x:Name="scheduler"
SelectedAppointmentsSource="{Binding SelectedAppointments}"
SelectedInterval="{Binding Interval, Mode=TwoWay}">
<dxsch:SchedulerControl.DataSource>
<dxsch:DataSource AppointmentsSource="{Binding Appointments}">
<dxsch:DataSource.AppointmentMappings>
<dxsch:AppointmentMappings Description="Description"
End="End"
RecurrenceInfo="RecurrenceInfo"
Start="Start"
Subject="Subject"
Type="Type" />
</dxsch:DataSource.AppointmentMappings>
</dxsch:DataSource>
</dxsch:SchedulerControl.DataSource>
</dxsch:SchedulerControl>
</DockPanel>
</dx:ThemedWindow>