using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Telerik.Windows.Controls.Scheduler;
namespace RadTestProject
{
public class AppointmentVM : AppointmentData, IEditableObject, IAppointment, IDataErrorInfo
{
#region Variables
private AppointmentVM _copy;
private bool _isInEditMode = false;
private string _Color;
#endregion
#region Properties
public string ShortSubject
{
get { return (!string.IsNullOrEmpty(ShortDescription) ? ShortDescription : Subject); }
}
public string Color
{
get
{
return _Color;
}
set
{
_Color = value;
this.RaisePropertyChanged("Color");
}
}
public bool IsInEditMode
{
get { return _isInEditMode; }
private set
{
if (_isInEditMode != value)
{
_isInEditMode = value;
this.RaisePropertyChanged("IsInEditMode");
}
}
}
#endregion
#region .Ctor
public AppointmentVM() : base()
{
this.ID = 0;
this.IsAllDayEvent = false;
this.Start = DateTime.Now;
this.End = DateTime.Now.AddDays(1);
this.IsEmpty = false;
}
public AppointmentVM(AppointmentData anAppointment) : this()
{
CopyFrom(anAppointment);
}
#endregion
public void CopyFrom(object toCopy)
{
if (toCopy is AppointmentData)
{
this.ID = ((AppointmentData)toCopy).ID;
this.RoomID = ((AppointmentData)toCopy).RoomID;
this.UserID = ((AppointmentData)toCopy).UserID;
this.Subject = ((AppointmentData)toCopy).Subject;
this.StartDate = ((AppointmentData)toCopy).StartDate;
this.EndDate = ((AppointmentData)toCopy).EndDate;
this.IsAllDayEvent = (bool)((AppointmentData)toCopy).IsAllDayEvent;
this.IsDeleted = ((AppointmentData)toCopy).IsDeleted;
this.Body = ((AppointmentData)toCopy).Body;
this.Address = ((AppointmentData)toCopy).Address;
this.ShortDescription = ((AppointmentData)toCopy).ShortDescription;
this.Location = ((AppointmentData)toCopy).Location;
this.ProjectID = ((AppointmentData)toCopy).ProjectID;
this.Remark = ((AppointmentData)toCopy).Remark;
}
}
#region IEditableObject Implementation
public void BeginEdit()
{
if (!IsInEditMode)
{
_copy = this.DeepClone() as AppointmentVM;
IsInEditMode = true;
}
}
public void CancelEdit()
{
if (_copy != null)
{
this.DeepClone(_copy, this);
}
_copy = null;
IsInEditMode = false;
}
public void EndEdit()
{
_copy = null;
IsInEditMode = false;
}
#endregion
#region IDeepClonable Implementation
public void DeepClone(object toClone, object aTarget)
{
if (toClone is AppointmentVM && aTarget is AppointmentVM)
{
((AppointmentVM)aTarget).ID = ((AppointmentVM)toClone).ID;
((AppointmentVM)aTarget).Address = ((AppointmentVM)toClone).Address;
((AppointmentVM)aTarget).RoomID = ((AppointmentVM)toClone).RoomID;
((AppointmentVM)aTarget).UserID = ((AppointmentVM)toClone).UserID;
((AppointmentVM)aTarget).Subject = ((AppointmentVM)toClone).Subject;
((AppointmentVM)aTarget).ShortDescription = ((AppointmentData)toClone).ShortDescription;
((AppointmentVM)aTarget).Start = ((AppointmentVM)toClone).Start;
((AppointmentVM)aTarget).End = ((AppointmentVM)toClone).End;
((AppointmentVM)aTarget).IsAllDayEvent = ((AppointmentVM)toClone).IsAllDayEvent;
((AppointmentVM)aTarget).IsDeleted = ((AppointmentVM)toClone).IsDeleted;
((AppointmentVM)aTarget).Body = ((AppointmentVM)toClone).Body;
((AppointmentVM)aTarget).Location = ((AppointmentVM)toClone).Location;
((AppointmentVM)aTarget).ProjectID = ((AppointmentData)toClone).ProjectID;
((AppointmentVM)aTarget).Remark = ((AppointmentData)toClone).Remark;
}
}
public object DeepClone(object toClone)
{
if (toClone is AppointmentVM)
{
AppointmentVM appointment = new AppointmentVM();
this.DeepClone(toClone, appointment);
return appointment;
}
return null;
}
public object DeepClone()
{
return this.DeepClone(this);
}
#endregion
public override bool Equals(object obj)
{
if (this.ID == 0)
{
return base.Equals(obj);
}
else
{
if (obj == null)
{
return false;
}
AppointmentVM compareObj = obj as AppointmentVM;
if ((object)compareObj == null)
{
return false;
}
return this.Equals(compareObj);
}
}
public bool Equals(AppointmentVM compareObj)
{
if (this.ID == 0)
{
return base.Equals(compareObj);
}
if ((object)compareObj == null)
{
return false;
}
return (this.ID == compareObj.ID);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
#region IAppointment Members
public IAppointment Copy()
{
return this.DeepClone() as AppointmentVM;
}
public void CopyFrom(IAppointment other)
{
this.DeepClone(other, this);
}
public DateTime End
{
get
{
return this.EndDate;
}
set
{
this.EndDate = value;
this.RaisePropertyChanged("End");
}
}
public RecurrenceRule RecurrenceRule
{
get
{
return null;
}
set
{
if (this.RecurrenceRuleChanged != null)
{
this.RecurrenceRuleChanged(this, new EventArgs());
}
}
}
public event EventHandler RecurrenceRuleChanged;
public DateTime Start
{
get
{
return this.StartDate;
}
set
{
this.StartDate = value;
this.RaisePropertyChanged("Start");
}
}
new public string Subject
{
get
{
return base.Subject;
}
set
{
base.Subject = value;
}
}
public TimeZoneInfo TimeZone
{
get;
set;
}
public ResourceCollection Resources
{
get;
internal set;
}
#endregion
#region IEmpty Members
public static AppointmentVM GetEmpty()
{
AppointmentVM toReturn = new AppointmentVM();
toReturn.IsEmpty = true;
return toReturn;
}
public bool IsEmpty
{
get;
internal set;
}
#endregion
#region IDataErrorInfo Members
public string Error
{
get { return this["Start"] + this["Subject"]; }
}
public string this[string columnName]
{
get
{
string results = null;
switch (columnName)
{
case "Start":
if (Start == null)
{
results = "Strings.StartDate_Required";
}
break;
case "Subject":
if (string.IsNullOrEmpty(Subject))
{
results = "Strings.Subject_Required";
}
break;
default:
results = string.Empty;
break;
}
return results ?? string.Empty;
}
}
#endregion
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
[System.SerializableAttribute()]
public partial class AppointmentData : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
{
[System.NonSerializedAttribute()]
private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string AddressField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string ProjectIDField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string RemarkField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string ShortDescriptionField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private long IDField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private System.Nullable<long> UserIDField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private System.Nullable<long> RoomIDField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private System.DateTime StartDateField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private System.DateTime EndDateField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string SubjectField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private bool IsAllDayEventField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private bool IsDeletedField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string BodyField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private bool IsSavedInExchangeField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private System.DateTime LastUpdatedField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string LocationField;
[global::System.ComponentModel.BrowsableAttribute(false)]
public System.Runtime.Serialization.ExtensionDataObject ExtensionData
{
get
{
return this.extensionDataField;
}
set
{
this.extensionDataField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string Address
{
get
{
return this.AddressField;
}
set
{
if ((object.ReferenceEquals(this.AddressField, value) != true))
{
this.AddressField = value;
this.RaisePropertyChanged("Address");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string ProjectID
{
get
{
return this.ProjectIDField;
}
set
{
if ((object.ReferenceEquals(this.ProjectIDField, value) != true))
{
this.ProjectIDField = value;
this.RaisePropertyChanged("ProjectID");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string Remark
{
get
{
return this.RemarkField;
}
set
{
if ((object.ReferenceEquals(this.RemarkField, value) != true))
{
this.RemarkField = value;
this.RaisePropertyChanged("Remark");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string ShortDescription
{
get
{
return this.ShortDescriptionField;
}
set
{
if ((object.ReferenceEquals(this.ShortDescriptionField, value) != true))
{
this.ShortDescriptionField = value;
this.RaisePropertyChanged("ShortDescription");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 5)]
public long ID
{
get
{
return this.IDField;
}
set
{
if ((this.IDField.Equals(value) != true))
{
this.IDField = value;
this.RaisePropertyChanged("ID");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 6)]
public System.Nullable<long> UserID
{
get
{
return this.UserIDField;
}
set
{
if ((this.UserIDField.Equals(value) != true))
{
this.UserIDField = value;
this.RaisePropertyChanged("UserID");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 7)]
public System.Nullable<long> RoomID
{
get
{
return this.RoomIDField;
}
set
{
if ((this.RoomIDField.Equals(value) != true))
{
this.RoomIDField = value;
this.RaisePropertyChanged("RoomID");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 8)]
public System.DateTime StartDate
{
get
{
return this.StartDateField;
}
set
{
if ((this.StartDateField.Equals(value) != true))
{
this.StartDateField = value;
this.RaisePropertyChanged("StartDate");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 9)]
public System.DateTime EndDate
{
get
{
return this.EndDateField;
}
set
{
if ((this.EndDateField.Equals(value) != true))
{
this.EndDateField = value;
this.RaisePropertyChanged("EndDate");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 10)]
public string Subject
{
get
{
return this.SubjectField;
}
set
{
if ((object.ReferenceEquals(this.SubjectField, value) != true))
{
this.SubjectField = value;
this.RaisePropertyChanged("Subject");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 11)]
public bool IsAllDayEvent
{
get
{
return this.IsAllDayEventField;
}
set
{
if ((this.IsAllDayEventField.Equals(value) != true))
{
this.IsAllDayEventField = value;
this.RaisePropertyChanged("IsAllDayEvent");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 12)]
public bool IsDeleted
{
get
{
return this.IsDeletedField;
}
set
{
if ((this.IsDeletedField.Equals(value) != true))
{
this.IsDeletedField = value;
this.RaisePropertyChanged("IsDeleted");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 13)]
public string Body
{
get
{
return this.BodyField;
}
set
{
if ((object.ReferenceEquals(this.BodyField, value) != true))
{
this.BodyField = value;
this.RaisePropertyChanged("Body");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 14)]
public bool IsSavedInExchange
{
get
{
return this.IsSavedInExchangeField;
}
set
{
if ((this.IsSavedInExchangeField.Equals(value) != true))
{
this.IsSavedInExchangeField = value;
this.RaisePropertyChanged("IsSavedInExchange");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 15)]
public System.DateTime LastUpdated
{
get
{
return this.LastUpdatedField;
}
set
{
if ((this.LastUpdatedField.Equals(value) != true))
{
this.LastUpdatedField = value;
this.RaisePropertyChanged("LastUpdated");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(Order = 16)]
public string Location
{
get
{
return this.LocationField;
}
set
{
if ((object.ReferenceEquals(this.LocationField, value) != true))
{
this.LocationField = value;
this.RaisePropertyChanged("Location");
}
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName)
{
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null))
{
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}
}
<Window
Title="Window1" mc:Ignorable="d" Loaded="Window_Loaded">
<Window.Resources>
</Window.Resources>
<Grid>
<telerik:RadScheduler x:Name="Scheduler" AppointmentCreating="Scheduler_AppointmentCreating" FirstDayOfWeek="Monday"
AppointmentSaving="Scheduler_AppointmentSaving" AppointmentAdded="Scheduler_AppointmentAdded" AppointmentTemplate="{DynamicResource AppointmentTemplate}" AppointmentEditing="Scheduler_AppointmentEditing" IsInlineEditingEnabled="False" ShowsConfirmationWindowOnDelete="False" AppointmentDeleting="Scheduler_AppointmentDeleting">
<telerik:RadScheduler.Resources>
<DataTemplate x:Key="AppointmentTemplate">
<Grid Focusable="False" Background="{Binding Occurrence.Appointment.Color}" ToolTipService.ShowDuration="24000" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MinHeight="20" />
<RowDefinition Height="Auto"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ToolTipService.ToolTip>
<Border CornerRadius="2" VerticalAlignment="Top">
<Grid Margin="8" MaxWidth="450" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#FF417542" BorderThickness="1,1,1,1" CornerRadius="2,2,2,2" Margin="0,0,0,3">
<Border BorderBrush="#FFFFFFFF" BorderThickness="1,1,1,1" CornerRadius="1,1,1,1" Background="{Binding Occurrence.Appointment.Color}" Padding="4" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock TextWrapping="Wrap" Text="{Binding Path=Occurrence.Appointment.Subject}" TextAlignment="Left" FontWeight="Bold" Margin="0,0,0,2" />
<TextBlock TextWrapping="Wrap" Text="{Binding Path=Occurrence.Appointment.Location}" TextAlignment="Left" FontWeight="Bold" Grid.Row="1" />
</Grid>
</Border>
</Border>
<TextBlock Grid.ColumnSpan="2" TextWrapping="Wrap" FontStyle="Italic" Grid.Column="0" Grid.Row="1" Text="{Binding Path=Occurrence.Appointment}" TextAlignment="Left"/>
<Label Grid.Column="0" Grid.Row="2" Content="user" Padding="0"/>
<TextBlock TextWrapping="Wrap" FontStyle="Italic" Grid.Column="1" Grid.Row="2" Text="{Binding Path=Occurrence.Appointment.User.DisplayName}" TextAlignment="Left"/>
<Label Grid.Column="0" Grid.Row="3" Content="room" Padding="0" />
<TextBlock TextWrapping="Wrap" FontStyle="Italic" Grid.Column="1" Grid.Row="3" Text="{Binding Path=Occurrence.Appointment.Room.DisplayName}" TextAlignment="Left"/>
<Label Grid.Column="0" Grid.Row="4" Content="status" Padding="0" />
<TextBlock TextWrapping="Wrap" FontStyle="Italic" Grid.Column="1" Grid.Row="4" Text="{Binding Path=Occurrence.Appointment.Status}" TextAlignment="Left"/>
<Label Grid.Column="0" Grid.Row="5" Content="project" Padding="0" />
<TextBlock TextWrapping="Wrap" FontStyle="Italic" Grid.Column="1" Grid.Row="5" Text="{Binding Path=Occurrence.Appointment.ProjectID}" TextAlignment="Left"/>
<Label Grid.Column="0" Grid.Row="6" Content="remark" Padding="0" Margin="0,0,5,0" />
<TextBlock TextWrapping="Wrap" FontStyle="Italic" Grid.Column="1" Grid.Row="6" Text="{Binding Path=Occurrence.Appointment.Remark}" TextAlignment="Left"/>
</Grid>
</Border>
</ToolTipService.ToolTip>
<TextBox x:Name="PART_SubjectTextBox" BorderThickness="0" IsHitTestVisible="False" Text="{Binding Occurrence.Appointment.Subject}" BorderBrush="{x:Null}" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" Margin="0" Background="{x:Null}">
<TextBox.Template>
<ControlTemplate TargetType="{x:Type TextBoxBase}">
<Border Background="{TemplateBinding Panel.Background}" BorderBrush="{TemplateBinding Border.BorderBrush}" BorderThickness="{TemplateBinding Border.BorderThickness}" SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</ControlTemplate>
</TextBox.Template>
</TextBox>
<TextBlock Grid.Row="1" Text="{Binding Occurrence.Appointment.Location, Mode=Default}" TextWrapping="Wrap" Margin="5,0,0,0" />
<TextBlock Grid.Row="2" Text="{Binding Occurrence.Appointment.Body, Mode=Default}" TextWrapping="Wrap" Margin="5,8,0,0" />
</Grid>
</DataTemplate>
</telerik:RadScheduler.Resources>
<telerik:RadScheduler.DayViewDefinition>
<telerik:DayViewDefinition TimeSlotLength="00:30:00" DayStartTime="06:00:00"/>
</telerik:RadScheduler.DayViewDefinition>
<telerik:RadScheduler.WeekViewDefinition>
<telerik:WeekViewDefinition VisibleDays="5" TimeSlotLength="00:30:00" DayStartTime="07:00:00"/>
</telerik:RadScheduler.WeekViewDefinition>
<telerik:RadScheduler.EditAppointmentStyle>
<Style TargetType="{x:Type telerik:AppointmentDialogWindow}">
<Style.Resources>
<telerik:AppointmentToTitleConverter x:Key="AppointmentToTitleConverter" />
</Style.Resources>
<Setter Property="Title" Value="{Binding Occurrence.Appointment, Converter={StaticResource AppointmentToTitleConverter}, RelativeSource={x:Static RelativeSource.Self}}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:AppointmentDialogWindow}">
<Grid DataContext="{TemplateBinding EditedAppointment}" Background="{TemplateBinding Background}" Width="430" >
<Grid.Resources>
<Style TargetType="{x:Type Label}">
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Margin" Value="0, 10, 0, 2" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="100" />
<ColumnDefinition Width="*" MinWidth="315"/>
</Grid.ColumnDefinitions>
<Label Target="{Binding ElementName=Subject}" Content="Subject" />
<TextBox x:Name="Onderwerp" Grid.Column="1" TabIndex="0" Text="{Binding Subject}" MaxLength="255" Margin="10, 10, 20, 2" />
<Label Grid.Row="1" Target="{Binding ElementName=StartDateTime}" Content="Start" />
<telerik:DateTimePicker x:Name="StartDateTime" Grid.Row="1" Grid.Column="1" Margin="10, 10, 0, 2" IsEnabled="False" SelectedDateTime="{Binding Start, Mode=TwoWay}" telerik:StartEndDatePicker.EndPicker="{Binding ElementName=EndDateTime}" />
<Label Grid.Row="2" Target="{Binding ElementName=EndDateTime}" Content="End" />
<telerik:DateTimePicker x:Name="EndDateTime" Grid.Row="2" Grid.Column="1" Margin="10, 10, 0, 2" IsEnabled="False" SelectedDateTime="{Binding End, Mode=TwoWay}" />
<CheckBox Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left" Margin="10, 10, 0, 2" x:Name="cbAvailableCheck" Content="CheckAvailabilityUsers"/>
<Label Grid.Row="4" Target="{Binding ElementName=cbUser}" Content="Strings" />
<ComboBox x:Name="cbUser" Grid.Column="1" Grid.Row="4" ItemsSource="{Binding Source={StaticResource cvUsersComboBox}}" DisplayMemberPath="DisplayName"
SelectedItem="{Binding User, Mode=TwoWay}" Margin="10, 10, 20, 2" />
<Label Grid.Row="5" Target="{Binding ElementName=cbRoom}" Content="Room" />
<ComboBox x:Name="cbRoom" Grid.Column="1" Grid.Row="5" DisplayMemberPath="Name" ItemsSource="{Binding ServiceController.Rooms, Source={StaticResource ServiceController}}" SelectedItem="{Binding Room, Mode=TwoWay}" Margin="10, 10, 20, 2" />
<CheckBox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left" IsChecked="{Binding IsAllDayEvent}" Margin="10, 10, 0, 2" x:Name="allDayEventCheckbox" IsEnabled="False" Content="Strings"/>
<Label Grid.Row="7" Target="{Binding ElementName=Body}" Content="Content" />
<TextBox x:Name="Body" Grid.Row="7" Grid.Column="1" Text="{Binding Body}" TextWrapping ="NoWrap" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" AcceptsReturn="true" AcceptsTab="True" Margin="10, 10, 20, 2" MinHeight="100" />
<StackPanel Grid.Row="8" Grid.Column="1" Orientation="Horizontal" Margin="10, 10, 0, 10">
<Button Command="{x:Static telerik:RadSchedulerCommands.SaveAppointment}" Content="SaveAndClose" />
<!--<Button Command="telerik:RadSchedulerCommands.EditRecurrenceRule" Margin="10, 0, 0, 0" Content="Wijzig patroon" />
<Button Command="telerik:RadSchedulerCommands.EditParentAppointment" Margin="10, 0, 0, 0" Content="Wijzig hoofdafspraak" />-->
</StackPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger SourceName="allDayEventCheckbox" Property="IsChecked" Value="true">
<Setter TargetName="StartDateTime" Property="TimePickerVisibility" Value="Collapsed" />
<Setter TargetName="EndDateTime" Property="TimePickerVisibility" Value="Collapsed" />
</Trigger>
<DataTrigger Binding="{Binding EditedAppointment.RecurrenceRule}" Value="{x:Null}">
<Setter TargetName="StartDateTime" Property="IsEnabled" Value="True" />
<Setter TargetName="EndDateTime" Property="IsEnabled" Value="True" />
<Setter TargetName="allDayEventCheckbox" Property="IsEnabled" Value="True" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</telerik:RadScheduler.EditAppointmentStyle>
</telerik:RadScheduler>
</Grid>
</Window>