Multi color and Alternate color

6 posts, 0 answers
  1. Chiara
    Chiara avatar
    31 posts
    Member since:
    Oct 2011

    Posted 21 Mar 2012 Link to this post

    Hi, 
    Is there a way to make the rad schedule view like the image attached?
    For each DIvision there will be match different colours, and the opacity change in base of the date (alternate opacity between date).

    best regards
    -chiara
  2. Chiara
    Chiara avatar
    31 posts
    Member since:
    Oct 2011

    Posted 22 Mar 2012 Link to this post

    Can you please reply at my post?
    Is very very important because I have to finish the program for next monday!
    Thanks
  3. DevCraft banner
  4. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 23 Mar 2012 Link to this post

    Hello Chiara,

    In order to achieve this I can suggest you to use the special slots functionality of the ScheduleView. More information you could find in this help article and an example -  in this online demo.

    All the best,
    Konstantina
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. Chiara
    Chiara avatar
    31 posts
    Member since:
    Oct 2011

    Posted 25 Mar 2012 Link to this post

    Hi Konstantina,
    thank you for your help. 
    I've another question, how can I show the hours under the date?

    chiara

  6. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 27 Mar 2012 Link to this post

    Hi,

    In order to display the hours you need to set the MinorTickLenght property of the view definition. Also, you could customize its format by setting the TimerulerMinorTickStringFormat property. An example you could find in this online demo and more information in these help articles:

    Kind regards,

    Konstantina
    the Telerik team

     

    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  7. Chiara
    Chiara avatar
    31 posts
    Member since:
    Oct 2011

    Posted 27 Mar 2012 Link to this post

    Hi, 
    I'm sorry but I've put the code you have suggested but it doesn't work.
    I see only the first line with the date, instead of two lines with the date and the hour.
    I attach the xaml of the style so you can check it out.
    Thank you very much indeed
    Chiara

    <ResourceDictionary
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
        xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
        xmlns:dragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:example="clr-namespace:Telerik.Windows.Examples.ScheduleView.TimeBar"
        xmlns:common="clr-namespace:Telerik.Windows.Examples.ScheduleView.Common"
        xmlns:scheduleView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView">
     
        <telerik:MetroColors x:Key="MetroColors" />
        <telerik:MetroTheme x:Key="Theme" />
        <SolidColorBrush x:Key="MainBrush" Color="{Binding Source={StaticResource MetroColors}, Path=Palette.MainColor}" />
        <SolidColorBrush x:Key="MarkerBrush" Color="{Binding Source={StaticResource MetroColors}, Path=Palette.MarkerColor}" />
        <SolidColorBrush x:Key="ValidationBrush" Color="{Binding Source={StaticResource MetroColors}, Path=Palette.ValidationColor}" />
        <SolidColorBrush x:Key="StrongBrush" Color="{Binding Source={StaticResource MetroColors}, Path=Palette.StrongColor}" />
        <SolidColorBrush x:Key="BasicBrush" Color="{Binding Source={StaticResource MetroColors}, Path=Palette.BasicColor}" />
        <SolidColorBrush x:Key="AccentBrush" Color="{Binding Source={StaticResource MetroColors}, Path=Palette.AccentColor}" />
        <Thickness x:Key="HorizontalGroupHeaderTodayBorderThickness">1 0 0 1</Thickness>
        <SolidColorBrush x:Key="GroupHeaderBorderBrush_Today" Color="#FF246982" />
        <Thickness x:Key="VerticalGroupHeaderTodayBorderThickness">0 1 1 1</Thickness>
        <ImageSource x:Key="AppointmentItem_Recurrence">/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/AppointmentException_Metro.png</ImageSource>
        <ImageSource x:Key="AppointmentItem_Exception">/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/AppointmentRecurrence_Metro.png</ImageSource>
        <SolidColorBrush x:Key="DecorationRectangleOuterBorder_DragOver" Color="#AA3C7FB0" />
        <ControlTemplate x:Key="CalendarIcon" TargetType="ContentControl">
            <Border Background="Transparent">
                <Path Data="M188,502L188,481.207C188,480.257,188.771,479.484,189.723,479.484L190.473,479.484L190.473,484.786L197.551,484.786L197.551,479.484L202.568,479.484L202.568,
                      484.786L209.645,484.786L209.645,479.484L210.516,479.484C211.465,479.484,212.237,480.257,212.237,481.207L212.237,502C212.237,502.949,211.465,503.722,210.516,
                      503.722L189.723,503.722C188.771,503.722,188,502.949,188,502 M209.746,487.307L190.503,487.307L190.503,501.544L209.746,501.544z M198.362,499.882L198.186,499.779C197.602,
                      499.439,197.403,498.687,197.744,498.102L201.192,492.208L197.258,492.208C196.581,492.208,196.031,491.658,196.031,490.98L196.031,490.777C196.031,490.102,196.581,489.551,
                      197.258,489.551L203.483,489.551C204.107,489.551,204.623,490.02,204.7,490.623C204.813,490.949,204.788,491.32,204.602,491.643L200.04,499.441C199.699,500.025,198.947,500.223,
                      198.362,499.882 M192.369,482.613L192.369,477.786C192.354,477.697,192.348,477.607,192.348,477.514C192.348,476.605,193.085,475.867,193.994,475.867C194.885,475.867,195.611,476.578,
                      195.639,477.461L195.654,477.461L195.654,482.613z M204.465,482.613L204.463,477.857C204.439,477.747,204.428,477.632,204.428,477.514C204.428,476.605,205.166,475.867,206.075,475.867C206.965,
                      475.867,207.692,476.578,207.721,477.461L207.749,477.461L207.749,482.613z"
                      Fill="{StaticResource MainBrush}" Stretch="Fill" Width="14" Height="16" />
            </Border>
        </ControlTemplate>
        <SolidColorBrush x:Key="RedCategoryBrush" Color="#FFE61E26" />
        <SolidColorBrush x:Key="GreenCategoryBrush" Color="#FF80AD30" />
        <SolidColorBrush x:Key="BlueCategoryBrush" Color="#FF25A0DA" />
        <SolidColorBrush x:Key="PurpleCategoryBrush" Color="#FF7E51A1" />
        <SolidColorBrush x:Key="YellowCategoryBrush" Color="#FFF1C700" />
        <SolidColorBrush x:Key="OliveCategoryBrush" Color="#FF986827" />
        <SolidColorBrush x:Key="PinkCategoryBrush" Color="#FFDA0780" />
        <SolidColorBrush x:Key="OrangeCategoryBrush" Color="#FFFF6900" />
        <SolidColorBrush x:Key="FreeMarkerBrush" Color="#FF309B46" />
        <SolidColorBrush x:Key="TentativeMarkerBrush" Color="#FF41229B" />
        <SolidColorBrush x:Key="BusyMarkerBrush" Color="#FFE61E26" />
        <SolidColorBrush x:Key="OutOfOfficeMarkerBrush" Color="#FFF1C700" />
     
        <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter" />
        <local:InvertedNullToVisibilityConverter x:Key="InvertedNullToVisibilityConverter" />
        <local:InvertedVisibilityConverter x:Key="InvertedVisibilityConverter" />
        <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
        <local:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
        <local:BoolToInputModeConverter x:Key="BoolToInputModeConverter" />
        <local:ResourcesSeparatorConverter x:Key="ResourcesSeparatorConverter" />
        <local:EnumToBooleanConverter x:Key="EnumToBoolConverter" />
        <local:EnumToVisibilityConverter x:Key="EnumToVisibilityConverter" />
        <local:InvertedBooleanConverter x:Key="InvertedBooleanConverter" />
        <local:RecurrenceStateIsExeptionToVisibilityConverter x:Key="RecurrenceStateIsExeptionToVisibilityConverter" />
        <local:RecurrenceStateIsOccurenceToVisibilityConverter x:Key="RecurrenceStateIsOccurenceToVisibilityConverter" />
        <local:DraggedAppointmentsToLocalizedStringConverter x:Key="DraggedAppointmentsToLocalizedStringConverter" />
        <local:EnumerableCountToVisibilityConverter x:Key="EnumerableCountToVisibilityConverter" />
        <example:SubjectToIconConverter x:Key="SubjectToIconConverter" />
        <example:SubjectToImageConverter x:Key="SubjectToImageConverter" />
     
        <telerik:LocalizationManager x:Key="LocalizationManager"/>
     
        <!--etichette lavori-->
        <example:SubjectToBackgroundConverter x:Key="SubjectToBackgroundConverter">
            <example:SubjectToBackgroundConverter.Resources>
                <SolidColorBrush x:Key="NewsLabelFill" Color="#aaB11E54" />
                <SolidColorBrush x:Key="MoviesLabelFill" Color="#aa328493" />
                <SolidColorBrush x:Key="SportsLabelFill" Color="#aaD6C400" />
                <SolidColorBrush x:Key="ShowsLabelFill" Color="#aa8A72AF" />
                <SolidColorBrush x:Key="KidsLabelFill" Color="#aa255C00" />
            </example:SubjectToBackgroundConverter.Resources>
        </example:SubjectToBackgroundConverter>
        <example:SubjectToTypeConverter x:Key="SubjectToTypeConverter" />
        <example:TimeSpanToAwConverter x:Key="TimeSpanToAwConverter" />
     
        <SolidColorBrush x:Key="NewsAppointmentBackgroundBrush" Color="#FFF9EAE6" />
        <!--Lime-->
        <SolidColorBrush x:Key="MoviesAppointmentBackgroundBrush" Color="#FFDDEAED" />
        <SolidColorBrush x:Key="SportsAppointmentBackgroundBrush" Color="#FFFFFECE" />
        <SolidColorBrush x:Key="ShowsAppointmentBackgroundBrush" Color="#FFE8E2EF" />
        <SolidColorBrush x:Key="KidsAppointmentBackgroundBrush" Color="#FFDAF0CB" />
     
        <SolidColorBrush x:Key="NewsAppointmentBorderBrush" Color="#FFF2D3CC" />
        <SolidColorBrush x:Key="MoviesAppointmentBorderBrush" Color="#FFACCDD3" />
        <SolidColorBrush x:Key="SportsAppointmentBorderBrush" Color="#FFFFFDB3" />
        <SolidColorBrush x:Key="ShowsAppointmentBorderBrush" Color="#FFD9D0E5" />
        <SolidColorBrush x:Key="KidsAppointmentBorderBrush" Color="#FFB5E198" />
     
     
     
     
        <!-- Styles and Templates -->
     
        <!-- DIALOGS >> -->
        <!--EditAppointmentStyle-->
        <local:ResourceTypeTemplateSelector x:Key="ResourcesEditorItemTemplateSelector">
            <local:ResourceTypeTemplateSelector.SingleSelectionTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="120" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="{Binding ResourceType.DisplayName}" Margin="6" />
                        <telerik:RadComboBox Grid.Column="1" Margin="3" ItemsSource="{Binding ResourceItems}" ClearSelectionButtonVisibility="Visible"
                                             ClearSelectionButtonContent="{Binding ClearAllButtonContent}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                                             DisplayMemberPath="Resource.DisplayName" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </Grid>
                </DataTemplate>
            </local:ResourceTypeTemplateSelector.SingleSelectionTemplate>
            <local:ResourceTypeTemplateSelector.MultipleSelectionTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="120" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="{Binding ResourceType.DisplayName}" Margin="6" />
                        <telerik:RadComboBox Grid.Column="1" Margin="3" ItemsSource="{Binding ResourceItems}" ClearSelectionButtonVisibility="Visible"
                                             ClearSelectionButtonContent="{Binding ClearAllButtonContent}" SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}"
                                             telerik:StyleManager.Theme="{StaticResource Theme}">
                            <telerik:RadComboBox.ItemContainerStyle>
                                <Style TargetType="telerik:RadComboBoxItem">
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Content="{Binding Resource.DisplayName}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </telerik:RadComboBox.ItemContainerStyle>
                            <telerik:RadComboBox.SelectionBoxTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Owner.CheckedItems, Converter={StaticResource ResourcesSeparatorConverter}}" />
                                </DataTemplate>
                            </telerik:RadComboBox.SelectionBoxTemplate>
                        </telerik:RadComboBox>
                    </Grid>
                </DataTemplate>
            </local:ResourceTypeTemplateSelector.MultipleSelectionTemplate>
        </local:ResourceTypeTemplateSelector>
        <DataTemplate x:Key="TimeMarkerComboBoxItemContentTemplate">
            <StackPanel Orientation="Horizontal">
                <Rectangle Fill="{Binding TimeMarkerBrush}" Margin="2 0" Width="12" Height="12" />
                <TextBlock telerik:LocalizationManager.ResourceKey="{Binding TimeMarkerName}" Margin="2 0" />
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="CategoryComboBoxItemContentTemplate">
            <StackPanel Orientation="Horizontal">
                <Rectangle Fill="{Binding CategoryBrush}" Margin="2 0" Width="12" Height="12" />
                <TextBlock Text="{Binding DisplayName}" Margin="2 0" />
            </StackPanel>
        </DataTemplate>
     
        <ControlTemplate x:Key="LowImportanceMarkTemplate">
            <Grid>
                <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" CornerRadius="5" Background="{StaticResource MainBrush}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                    <Grid>
                        <Path Data="F1M329.667,242.3496L324.512,236.8906L324.512,241.3296L331.411,248.6386L338.28,241.3636L338.28,236.9226L333.152,242.3496L333.152,230.0356L329.667,230.0356z"
                              Fill="{StaticResource MarkerBrush}" Stretch="Fill" Margin="2,1" />
                    </Grid>
                </Border>
            </Grid>
        </ControlTemplate>
     
        <ControlTemplate x:Key="HighImportanceMarkTemplate">
            <Grid>
                <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" CornerRadius="5" Background="{StaticResource ValidationBrush}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                    <Grid>
                        <Rectangle Fill="{StaticResource MainBrush}" Height="2" Margin="4,0,4,1" VerticalAlignment="Bottom"/>
                        <Rectangle Fill="{StaticResource MainBrush}" Margin="4,1,4,4"/>
                    </Grid>
                </Border>
            </Grid>
        </ControlTemplate>
     
        <Style x:Key="ImportanceMarkContentControlStyle" TargetType="ContentControl">
            <Setter Property="Width" Value="10" />
            <Setter Property="Height" Value="10" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
        </Style>
     
        <ControlTemplate x:Key="EditAppointmentTemplate" TargetType="local:SchedulerDialog">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
     
                <telerik:RadToolBar x:Name="AppointmentToolbar" BorderThickness="0 0 0 1" GripVisibility="Collapsed" Grid.Row="0" Margin="-1 0 -1 3" telerik:StyleManager.Theme="{StaticResource Theme}">
                    <telerik:RadButton x:Name="EditRecurrenceButton" Command="local:RadScheduleViewCommands.EditRecurrenceRule"
                                       Visibility="{Binding CanEditParentAppointment, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="EditRecurrence" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </ToolTipService.ToolTip>
                        <TextBlock Margin="6 0" telerik:LocalizationManager.ResourceKey="EditRecurrence" Foreground="{StaticResource StrongBrush}" />
                    </telerik:RadButton>
                    <telerik:RadButton x:Name="EditParentAppointmentButton" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                       Command="local:RadScheduleViewCommands.EditParentAppointment" Visibility="{Binding CanEditParentAppointment, Converter={StaticResource BooleanToVisibilityConverter}}">
                        <ToolTipService.ToolTip>
                            <TextBlock telerik:LocalizationManager.ResourceKey="EditParentAppointment" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </ToolTipService.ToolTip>
                        <TextBlock Margin="4 0" telerik:LocalizationManager.ResourceKey="EditParentAppointment" Foreground="{StaticResource StrongBrush}" />
                    </telerik:RadButton>
                    <telerik:RadToolBarSeparator />
                    <TextBlock x:Name="ShowAs" telerik:LocalizationManager.ResourceKey="ShowAs" Margin="1 0 1 1" VerticalAlignment="Center" Foreground="{StaticResource StrongBrush}" />
                    <telerik:RadComboBox x:Name="PART_TimeMarkers" Margin="2 1" Width="110" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                         EmptyText="{Binding TimeMarkersEmptyText}" ItemsSource="{Binding TimeMarkers}" SelectedItem="{Binding Occurrence.Appointment.TimeMarker, Mode=TwoWay}"
                                         ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="{Binding ClearSelectionButtonContent}"
                                         ItemTemplate="{StaticResource TimeMarkerComboBoxItemContentTemplate}" SelectionBoxTemplate="{StaticResource TimeMarkerComboBoxItemContentTemplate}"
                                         telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <telerik:RadComboBox x:Name="PART_Categories" Margin="2 1" Width="130" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                         EmptyText="{Binding CategoriesEmptyText}" ItemsSource="{Binding Categories}" SelectedItem="{Binding Occurrence.Appointment.Category, Mode=TwoWay}"
                                         ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="{Binding ClearSelectionButtonContent}"
                                         ItemTemplate="{StaticResource CategoryComboBoxItemContentTemplate}" SelectionBoxTemplate="{StaticResource CategoryComboBoxItemContentTemplate}"
                                         telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <telerik:RadToggleButton x:Name="HighImportaceButton" Width="22" Height="22" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                             IsChecked="{Binding IsHighImportance, Mode=TwoWay}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="HighImportance" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </ToolTipService.ToolTip>
                        <ContentControl x:Name="HighImportanceMark" Template="{StaticResource HighImportanceMarkTemplate}" Margin="2 1 1 0" Style="{StaticResource ImportanceMarkContentControlStyle}"  />
                    </telerik:RadToggleButton>
                    <telerik:RadToggleButton x:Name="LowImportaceButton" Width="22" Height="22" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                             IsChecked="{Binding IsLowImportance, Mode=TwoWay}">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="LowImportance" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </ToolTipService.ToolTip>
                        <ContentControl x:Name="LowImportanceMark" Template="{StaticResource LowImportanceMarkTemplate}" Margin="2 1 1 0" Style="{StaticResource ImportanceMarkContentControlStyle}"  />
                    </telerik:RadToggleButton>
                </telerik:RadToolBar>
     
                <Border x:Name="AppointmentCategory" Grid.Row="1" Height="20" Margin="6 6" Background="{Binding SelectedItem.CategoryBrush, ElementName=PART_Categories}"
                        Visibility="{Binding SelectedItem, ElementName=PART_Categories,Converter={StaticResource NullToVisibilityConverter}}">
                    <TextBlock Margin="6 0" Text="{Binding SelectedItem.DisplayName, ElementName=PART_Categories}" Foreground="{StaticResource MainBrush}" VerticalAlignment="Center"  />
                </Border>
     
                <Grid x:Name="Details" Grid.Row="2" Margin="6">
                    <Grid.Resources>
                        <telerik:InputMode x:Key="RadDateTimePickerInputModeDatePicker">DatePicker</telerik:InputMode>
                    </Grid.Resources>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
     
                    <TextBlock Grid.Row="0" Grid.Column="0" Margin="6" telerik:LocalizationManager.ResourceKey="Subject" />
                    <TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" IsReadOnly="{Binding IsReadOnly}" Text="{Binding Occurrence.Appointment.Subject, Mode=TwoWay}"
                             telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <TextBlock Grid.Row="1" Grid.Column="0" Margin="6" telerik:LocalizationManager.ResourceKey="Body" />
                    <TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" Height="70" IsReadOnly="{Binding IsReadOnly}" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"
                             VerticalScrollBarVisibility="Visible" Text="{Binding Occurrence.Appointment.Body, Mode=TwoWay}" TextWrapping="Wrap" telerik:StyleManager.Theme="{StaticResource Theme}"  />
                    <TextBlock Grid.Row="2" Grid.Column="0" Margin="6" telerik:LocalizationManager.ResourceKey="StartTime" />
     
                    <telerik:RadDateTimePicker Grid.Row="2" Grid.Column="1" Margin="3" IsReadOnly="{Binding IsReadOnly}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}"
                                               SelectedValue="{Binding ActualStart, Mode=TwoWay}" IsEnabled="{Binding IsNotRecurrent}" telerik:StyleManager.Theme="{StaticResource Theme}">
                        <telerik:RadDateTimePicker.InputMode>
                            <Binding Path="IsAllDayEvent" Converter="{StaticResource BoolToInputModeConverter}">
                                <Binding.ConverterParameter>
                                    <telerik:InputMode>DatePicker</telerik:InputMode>
                                </Binding.ConverterParameter>
                            </Binding>
                        </telerik:RadDateTimePicker.InputMode>
                    </telerik:RadDateTimePicker>
     
                    <TextBlock Grid.Row="3" Grid.Column="0" Margin="6" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="EndTime" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <telerik:RadDateTimePicker Grid.Row="3" Grid.Column="1" Margin="3" IsReadOnly="{Binding IsReadOnly}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}"
                                               SelectedValue="{Binding ActualEnd, Mode=TwoWay}" IsEnabled="{Binding IsNotRecurrent}" telerik:StyleManager.Theme="{StaticResource Theme}">
                        <telerik:RadDateTimePicker.InputMode>
                            <Binding Path="IsAllDayEvent" Converter="{StaticResource BoolToInputModeConverter}">
                                <Binding.ConverterParameter>
                                    <telerik:InputMode>DatePicker</telerik:InputMode>
                                </Binding.ConverterParameter>
                            </Binding>
                        </telerik:RadDateTimePicker.InputMode>
                    </telerik:RadDateTimePicker>
     
                    <CheckBox x:Name="AllDayEventCheckbox" Grid.Row="4" Grid.Column="1" Margin="3" VerticalAlignment="Center" IsChecked="{Binding Path=IsAllDayEvent, Mode=TwoWay}"
                              IsEnabled="{Binding IsNotRecurrent}" telerik:LocalizationManager.ResourceKey="AllDayEvent" telerik:StyleManager.Theme="{StaticResource Theme}" />
                </Grid>
     
                <!-- Resource Editor -->
                <Grid Grid.Row="3" Margin="3" Visibility="{Binding ResourceTypesVisibility}">
                    <telerik:ItemsControl x:Name="PART_Resources" Margin="3" IsTabStop="false" BorderBrush="{x:Null}" BorderThickness="0" HorizontalContentAlignment="Stretch"
                                          VerticalContentAlignment="Stretch" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" ItemsSource="{Binding ResourceTypes}"
                                          ItemTemplateSelector="{StaticResource ResourcesEditorItemTemplateSelector}" Visibility="{Binding ResourceTypesVisibility}" />
                    <TextBlock HorizontalAlignment="Center" Text="You can only change the resources by opening the series" Margin="3"
                               Visibility="{Binding ResourceTypesVisibility, Converter={StaticResource InvertedVisibilityConverter}}" />
                </Grid>
     
                <StackPanel Grid.Row="4" Margin="13 6" HorizontalAlignment="Right" Orientation="Horizontal">
                    <telerik:RadButton Margin="2" MinWidth="84" Command="telerik:WindowCommands.Confirm" telerik:LocalizationManager.ResourceKey="Ok"
                                       telerik:RadWindow.ResponseButton="Accept" telerik:StyleManager.Theme="{StaticResource Theme}">
                        <ToolTipService.ToolTip>
                            <TextBlock telerik:LocalizationManager.ResourceKey="SaveAndClose" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </ToolTipService.ToolTip>
                    </telerik:RadButton>
                    <telerik:RadButton Margin="2" MinWidth="84" Command="telerik:WindowCommands.Cancel" telerik:LocalizationManager.ResourceKey="Cancel"
                                       telerik:RadWindow.ResponseButton="Cancel" telerik:StyleManager.Theme="{StaticResource Theme}" />
                </StackPanel>
            </Grid>
        </ControlTemplate>
     
        <Style x:Key="EditAppointmentDialogStyle" TargetType="local:SchedulerDialog">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="Width" Value="560" />
            <Setter Property="IsTabStop" Value="False" />
            <Setter Property="Template" Value="{StaticResource EditAppointmentTemplate}" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" MaxWidth="400" HorizontalAlignment="Left">
                            <TextBlock telerik:LocalizationManager.ResourceKey="Event" Visibility="{Binding Occurrence.Appointment.IsAllDayEvent, Converter={StaticResource BooleanToVisibilityConverter}}" />
                            <TextBlock telerik:LocalizationManager.ResourceKey="Appointment"
                                       Visibility="{Binding Occurrence.Appointment.IsAllDayEvent, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" />
                            <TextBlock Text=" - " />
                            <TextBlock x:Name="SubjectTextBlock" Text="{Binding Occurrence.Appointment.Subject}"
                                       Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                            <TextBlock telerik:LocalizationManager.ResourceKey="Untitled" Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="IconTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <Path  Data="M188,502L188,481.207C188,480.257,188.771,479.484,189.723,479.484L190.473,479.484L190.473,484.786L197.551,484.786L197.551,479.484L202.568,
                               479.484L202.568,484.786L209.645,484.786L209.645,479.484L210.516,479.484C211.465,479.484,212.237,480.257,212.237,481.207L212.237,502C212.237,502.949,
                               211.465,503.722,210.516,503.722L189.723,503.722C188.771,503.722,188,502.949,188,502 M209.746,487.307L190.503,487.307L190.503,501.544L209.746,501.544z
                               M198.362,499.882L198.186,499.779C197.602,499.439,197.403,498.687,197.744,498.102L201.192,492.208L197.258,492.208C196.581,492.208,196.031,491.658,196.031,
                               490.98L196.031,490.777C196.031,490.102,196.581,489.551,197.258,489.551L203.483,489.551C204.107,489.551,204.623,490.02,204.7,490.623C204.813,490.949,204.788,
                               491.32,204.602,491.643L200.04,499.441C199.699,500.025,198.947,500.223,198.362,499.882 M192.369,482.613L192.369,477.786C192.354,477.697,192.348,477.607,
                               192.348,477.514C192.348,476.605,193.085,475.867,193.994,475.867C194.885,475.867,195.611,476.578,195.639,477.461L195.654,477.461L195.654,482.613z M204.465,
                               482.613L204.463,477.857C204.439,477.747,204.428,477.632,204.428,477.514C204.428,476.605,205.166,475.867,206.075,475.867C206.965,
                               475.867,207.692,476.578,207.721,477.461L207.749,477.461L207.749,482.613z"
                               Fill="{StaticResource MainBrush}" Stretch="Fill" Width="14" Height="16" Margin="0 0 2 0" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <!--EditRecurrenceStyle-->
        <Style x:Key="RepeatSelectionTabItemControlStyle" TargetType="telerik:RadTabItem">
            <Setter Property="Margin" Value="3" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadTabItem">
                        <RadioButton IsChecked="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}">
                            <ContentPresenter  telerik:LocalizationManager.ResourceKey="{TemplateBinding Header}"/>
                        </RadioButton>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="RepeatSelectionTabControlStyle" TargetType="telerik:RadTabControl">
            <Setter Property="TabStripPlacement" Value="Top" />
            <Setter Property="ItemContainerStyle" Value="{StaticResource RepeatSelectionTabItemControlStyle}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadTabControl">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <ItemsPresenter Grid.Column="0" Margin="3 6 30 6" VerticalAlignment="Center" />
                            <telerik:RadTransitionControl x:Name="ContentElement" Grid.Column="1" IsTabStop="False" Duration="0:0:0.200"
                                                          Content="{TemplateBinding SelectedContent}"
                                                          ContentTemplate="{TemplateBinding SelectedContentTemplate}">
                                <telerik:RadTransitionControl.Transition>
                                    <telerik:SlideAndZoomTransition />
                                </telerik:RadTransitionControl.Transition>
                            </telerik:RadTransitionControl>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
     
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <StackPanel />
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <ControlTemplate x:Key="EditRecurrenceTemplate" TargetType="local:SchedulerDialog">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
     
                <telerik:GroupBox x:Name="StartEndTimes" Margin="3" telerik:LocalizationManager.ResourceKey="AppointmentTime" telerik:StyleManager.Theme="{StaticResource Theme}">
                    <Grid HorizontalAlignment="Center">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
     
                        <telerik:Label Grid.Row="0" Grid.Column="0" MinWidth="65" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                       Target="{Binding ElementName=StartTimePicker}" telerik:LocalizationManager.ResourceKey="StartColon" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        <telerik:RadDateTimePicker x:Name="StartTimePicker" Grid.Row="0" Grid.Column="1" Margin="3" Width="120" IsReadOnly="{Binding IsReadOnly}"
                                                   SelectedValue="{Binding Start, Mode=TwoWay}" InputMode="TimePicker" telerik:StyleManager.Theme="{StaticResource Theme}" />
     
                        <telerik:Label Grid.Row="1" Grid.Column="0" MinWidth="65" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                       Target="{Binding ElementName=EndTimePicker}" telerik:LocalizationManager.ResourceKey="EndColon" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        <telerik:RadDateTimePicker x:Name="EndTimePicker" Grid.Row="1" Grid.Column="1" Margin="3" Width="120" IsReadOnly="{Binding IsReadOnly}"
                                                   SelectedValue="{Binding End, Mode=TwoWay}" InputMode="TimePicker" telerik:StyleManager.Theme="{StaticResource Theme}" />
     
                        <telerik:Label Grid.RowSpan="2" Grid.Column="2" MinWidth="65" VerticalAlignment="Center" Margin="18 0 0 0"
                                       IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" Target="{Binding ElementName=DurationPicker}"
                                       telerik:LocalizationManager.ResourceKey="DurationColon" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        <local:DurationPicker x:Name="DurationPicker" Grid.RowSpan="2" Grid.Column="3" Margin="3" Width="120" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                              VerticalAlignment="Center"  SelectedDuration="{Binding Path=Duration, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
     
                    </Grid>
                </telerik:GroupBox>
     
                <telerik:GroupBox x:Name="RepeatsGroup" Margin="3" Grid.Row="1" telerik:LocalizationManager.ResourceKey="RecurrencePattern" telerik:StyleManager.Theme="{StaticResource Theme}">
                    <telerik:RadTabControl IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" IsDefaultItemSelected="False" Style="{StaticResource RepeatSelectionTabControlStyle}">
                        <telerik:RadTabItem x:Name="RepeatDaily" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Daily"
                                            IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Daily;WeekDays, Mode=TwoWay}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal">
                                    <RadioButton x:Name="DailyRB" Margin="3" VerticalAlignment="Center" GroupName="DailyGroup" telerik:LocalizationManager.ResourceKey="Every"
                                                 IsChecked="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Daily, Mode=TwoWay}"
                                                 telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <telerik:RadNumericUpDown x:Name="DailyDetailsUpDown" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="999"
                                                              Value="{Binding Interval, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Days" Foreground="{StaticResource StrongBrush}" />
                                </StackPanel>
                                <RadioButton x:Name="WorkdaysRB" Grid.Row="1" Margin="3" VerticalAlignment="Center" GroupName="DailyGroup" telerik:LocalizationManager.ResourceKey="EveryWeekday"
                                             IsChecked="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=WeekDays, Mode=TwoWay}"
                                             telerik:StyleManager.Theme="{StaticResource Theme}" />
                            </Grid>
                        </telerik:RadTabItem>
                        <telerik:RadTabItem x:Name="RepeatWeekly" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Weekly"
                                            IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Weekly, Mode=TwoWay}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal">
                                    <telerik:Label Margin="3" VerticalAlignment="Center" Target="{Binding ElementName=EveryWeekUpDown}" telerik:LocalizationManager.ResourceKey="RecurEvery"
                                                   telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <telerik:RadNumericUpDown x:Name="EveryWeekUpDown" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="99"
                                                              Value="{Binding Interval, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}"  >
                                    </telerik:RadNumericUpDown>
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="WeeksOn" Foreground="{StaticResource StrongBrush}" />
                                </StackPanel>
                                <ItemsControl Grid.Row="1" ItemsSource="{Binding WeekDays}" IsTabStop="False">
                                    <ItemsControl.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <telerik:RadUniformGrid Rows="2" />
                                        </ItemsPanelTemplate>
                                    </ItemsControl.ItemsPanel>
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <CheckBox Margin="3 3 12 3" Content="{Binding Name}" IsChecked="{Binding  IsSelected, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                            </Grid>
                        </telerik:RadTabItem>
                        <telerik:RadTabItem x:Name="RepeatMonthly" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Monthly"
                                            IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Monthly;MonthlyNth, Mode=TwoWay}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal">
                                    <RadioButton x:Name="MonthlyRB" Margin="3" VerticalAlignment="Center" GroupName="MonthlyButtons" telerik:LocalizationManager.ResourceKey="Day"
                                                 IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Monthly, Mode=TwoWay}"
                                                 telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <telerik:RadNumericUpDown x:Name="MonthlyDetailsUpDown1" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="31"
                                                              Value="{Binding DayOfMonth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="OfEvery" Foreground="{StaticResource StrongBrush}" />
                                    <telerik:RadNumericUpDown Name="MonthlyDetailsUpDown2" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="99"
                                                              Value="{Binding Interval, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Months" Foreground="{StaticResource StrongBrush}" />
                                </StackPanel>
                                <StackPanel Grid.Row="1" Orientation="Horizontal">
                                    <RadioButton x:Name="MonthlyNthRB" Margin="3" VerticalAlignment="Center" GroupName="MonthlyButtons" telerik:LocalizationManager.ResourceKey="The"
                                                 IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=MonthlyNth, Mode=TwoWay}"
                                                 telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <telerik:RadComboBox Margin="3" VerticalAlignment="Center" Width="70" ItemsSource="{Binding WeekOfMonths}" DisplayMemberPath="Name" SelectedValuePath="Value"
                                                         SelectedValue="{Binding WeekOfMonth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <telerik:RadComboBox Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NthRecurrenceDays}" DisplayMemberPath="Name" SelectedValuePath="Value"
                                                         SelectedValue="{Binding NthRecurrenceDay, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="OfEvery" Foreground="{StaticResource StrongBrush}" />
                                    <telerik:RadNumericUpDown Name="MonthlyDetailsUpDown3" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="99"
                                                              Value="{Binding Interval, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Months" Foreground="{StaticResource StrongBrush}" />
                                </StackPanel>
                            </Grid>
                        </telerik:RadTabItem>
                        <telerik:RadTabItem x:Name="RepeatYearly" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Yearly"
                                            IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Yearly;YearlyNth, Mode=TwoWay}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="50*" />
                                    <RowDefinition Height="50*" />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal">
                                    <RadioButton x:Name="YearlyRB" GroupName="YearlyGroup" Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Every"
                                                 IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Yearly, Mode=TwoWay}"
                                                 telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <telerik:RadComboBox x:Name="YearlyDetails12" Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NamesOfMonths}" DisplayMemberPath="Value"
                                                         SelectedValuePath="Key" SelectedValue="{Binding MonthOfYear, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <telerik:RadNumericUpDown x:Name="YearlyDetailsUpDown3" Margin="3" VerticalAlignment="Center" Width="70" IsInteger="True" Maximum="31"
                                                              Value="{Binding DayOfMonth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                </StackPanel>
                                <StackPanel Grid.Row="1" Orientation="Horizontal">
                                    <RadioButton x:Name="YearlyNthRB" GroupName="YearlyGroup" Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="The"
                                                 IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=YearlyNth, Mode=TwoWay}"
                                                 telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <telerik:RadComboBox x:Name="YearlyDetails21" Margin="3" VerticalAlignment="Center" Width="80" ItemsSource="{Binding WeekOfMonths}" DisplayMemberPath="Name"
                                                         SelectedValuePath="Value" SelectedValue="{Binding WeekOfMonth, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <telerik:RadComboBox x:Name="YearlyDetails22" Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NthRecurrenceDays}" DisplayMemberPath="Name"
                                                         SelectedValuePath="Value" SelectedValue="{Binding NthRecurrenceDay, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Of" Foreground="{StaticResource StrongBrush}" />
                                    <telerik:RadComboBox x:Name="YearlyDetails23" Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NamesOfMonths}" DisplayMemberPath="Value"
                                                         SelectedValuePath="Key" SelectedValue="{Binding MonthOfYear, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                                </StackPanel>
                            </Grid>
                        </telerik:RadTabItem>
                    </telerik:RadTabControl>
                </telerik:GroupBox>
     
                <telerik:GroupBox x:Name="RangeGroup" Margin="3" Grid.Row="2" telerik:LocalizationManager.ResourceKey="RangeOfRecurrence" telerik:StyleManager.Theme="{StaticResource Theme}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1*" />
                            <ColumnDefinition Width="2*" />
                        </Grid.ColumnDefinitions>
     
                        <StackPanel Grid.Column="0" Orientation="Horizontal">
                            <telerik:Label Margin="3" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                           Target="{Binding ElementName=StartDate}" telerik:LocalizationManager.ResourceKey="StartColon" telerik:StyleManager.Theme="{StaticResource Theme}" />
                            <telerik:RadDatePicker x:Name="StartDate" Margin="3" VerticalAlignment="Center" Width="100" IsReadOnly="{Binding IsReadOnly}"
                                                   SelectedValue="{Binding Start, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        </StackPanel>
     
                        <telerik:RadUniformGrid Grid.Column="1" Columns="1">
                            <RadioButton x:Name="NoEndDate" Margin="3" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                         telerik:LocalizationManager.ResourceKey="NoEndDate" telerik:StyleManager.Theme="{StaticResource Theme}"
                                         IsChecked="{Binding RecurrenceRangeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=NoEndDate, Mode=TwoWay}"/>
     
                            <StackPanel Orientation="Horizontal">
                                <RadioButton x:Name="EndAfter" Margin="3" MinWidth="100" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                             telerik:LocalizationManager.ResourceKey="EndAfter" telerik:StyleManager.Theme="{StaticResource Theme}"
                                             IsChecked="{Binding Path=RecurrenceRangeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=MaxOccurrences, Mode=TwoWay}" />
                                <telerik:RadNumericUpDown x:Name="OccurencesUpDown" Margin="3" VerticalAlignment="Center" telerik:StyleManager.Theme="{StaticResource Theme}"
                                                          IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                                          IsInteger="True" MinWidth="70" Maximum="9999" Value="{Binding MaxOccurrences, Mode=TwoWay}" />
                                <TextBlock Margin="3" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="Occurrences" Foreground="{StaticResource StrongBrush}" />
                            </StackPanel>
     
                            <StackPanel Orientation="Horizontal">
                                <RadioButton x:Name="EndBy" Margin="3" MinWidth="70" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
                                             telerik:StyleManager.Theme="{StaticResource Theme}" telerik:LocalizationManager.ResourceKey="EndBy"
                                             IsChecked="{Binding Path=RecurrenceRangeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=RepeatUntil, Mode=TwoWay}" />
                                <telerik:RadDatePicker Margin="3" VerticalAlignment="Center" Width="120" IsReadOnly="{Binding IsReadOnly}" SelectedValue="{Binding RecursUntil, Mode=TwoWay}"
                                                       telerik:StyleManager.Theme="{StaticResource Theme}" />
                            </StackPanel>
                        </telerik:RadUniformGrid>
                    </Grid>
                </telerik:GroupBox>
     
                <StackPanel x:Name="WindowButtons" Grid.Row="3" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                    <telerik:RadButton x:Name="RemoveRecurrenceBtn" Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="RemoveRecurrence" Command="local:RadScheduleViewCommands.DeleteRecurrenceRule"
                                       Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay}"
                                       telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <telerik:RadButton x:Name="OKButton" Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" Command="telerik:WindowCommands.Confirm" telerik:RadWindow.ResponseButton="Accept"
                                       telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <telerik:RadButton x:Name="CancelButton" Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" Command="telerik:WindowCommands.Cancel"
                                       telerik:RadWindow.ResponseButton="Cancel" telerik:StyleManager.Theme="{StaticResource Theme}" />
                </StackPanel>
            </Grid>
        </ControlTemplate>
     
        <Style x:Key="EditRecurrenceDialogStyle" TargetType="local:SchedulerDialog">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="Width" Value="550" />
            <Setter Property="IsTabStop" Value="False" />
            <Setter Property="Template" Value="{StaticResource EditRecurrenceTemplate}" />
            <Setter Property="IconTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <Path Data="M188,502L188,481.207C188,480.257,188.771,479.484,189.723,479.484L190.473,479.484L190.473,484.786L197.551,484.786L197.551,479.484L202.568,
                              479.484L202.568,484.786L209.645,484.786L209.645,479.484L210.516,479.484C211.465,479.484,212.237,480.257,212.237,481.207L212.237,502C212.237,
                              502.949,211.465,503.722,210.516,503.722L189.723,503.722C188.771,503.722,188,502.949,188,502 M209.746,487.307L190.503,487.307L190.503,501.544L209.746,501.544z
                              M198.362,499.882L198.186,499.779C197.602,499.439,197.403,498.687,197.744,498.102L201.192,492.208L197.258,492.208C196.581,492.208,196.031,491.658,
                              196.031,490.98L196.031,490.777C196.031,490.102,196.581,489.551,197.258,489.551L203.483,489.551C204.107,489.551,204.623,490.02,204.7,490.623C204.813,490.949,204.788,
                              491.32,204.602,491.643L200.04,499.441C199.699,500.025,198.947,500.223,198.362,499.882M192.369,482.613L192.369,477.786C192.354,477.697,192.348,477.607,192.348,
                              477.514C192.348,476.605,193.085,475.867,193.994,475.867C194.885,475.867,195.611,476.578,195.639,477.461L195.654,477.461L195.654,482.613z M204.465,482.613L204.463,
                              477.857C204.439,477.747,204.428,477.632,204.428,477.514C204.428,476.605,205.166,475.867,206.075,475.867C206.965,475.867,207.692,476.578,
                              207.721,477.461L207.749,477.461L207.749,482.613z"
                              Fill="{StaticResource MainBrush}" Stretch="Fill" Width="14" Height="16" Margin="0 0 2 0" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" MaxWidth="450" HorizontalAlignment="Left">
                            <TextBlock telerik:LocalizationManager.ResourceKey="Event" Visibility="{Binding Appointment.IsAllDayEvent, Converter={StaticResource BooleanToVisibilityConverter}}" />
                            <TextBlock telerik:LocalizationManager.ResourceKey="Appointment" Visibility="{Binding Appointment.IsAllDayEvent, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"  />
                            <TextBlock Text=" - "  />
                            <TextBlock x:Name="SubjectTextBlock" Text="{Binding Appointment.Subject}" Visibility="{Binding Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                            <TextBlock telerik:LocalizationManager.ResourceKey="Untitled" Visibility="{Binding Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <!-- DeleteAppointmentConfirmStyle-->
        <ControlTemplate x:Key="DeleteAppointmentConfirmTemplate" TargetType="local:SchedulerDialog">
            <StackPanel>
                <Grid>
                    <Path Data="M2.761554,0 L8.3200254,5.5746889 L13.895003,0.026993264 L16.482,2.6230006 L10.907351,8.1695642 L16.470552,13.748997 L13.873553,16.330997 L8.3111095,10.752727
                          L2.5870051,16.447992 L0,13.853999 L5.7238765,8.1581335 L0.1645541,2.5829935 z"
                          Fill="{StaticResource BasicBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" Height="32" Width="32" Margin="15" Stretch="Fill"  />
                    <TextBlock Margin="65 15 15 15" TextWrapping="Wrap" VerticalAlignment="Center" telerik:LocalizationManager.ResourceKey="DeleteItemQuestion" />
                </Grid>
                <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" Command="telerik:WindowCommands.Confirm" telerik:RadWindow.ResponseButton="Accept"
                                       telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" Command="telerik:WindowCommands.Cancel" telerik:RadWindow.ResponseButton="Cancel"
                                       telerik:StyleManager.Theme="{StaticResource Theme}"  />
                </StackPanel>
            </StackPanel>
        </ControlTemplate>
     
        <Style x:Key="DeleteAppointmentConfirmDialogStyle" TargetType="local:SchedulerDialog">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="Width" Value="300" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="DeleteItem" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template" Value="{StaticResource DeleteAppointmentConfirmTemplate}" />
        </Style>
     
        <!--RecurrenceChoiceStyle-->
        <ControlTemplate x:Key="RecurrenceChoiceTemplate" TargetType="local:SchedulerDialog">
            <StackPanel>
                <Grid>
                    <Path Data="M7.7728186,17.951994 C9.1318111,17.951994 10.230818,19.052002 10.230818,20.40601 C10.230818,21.760994 9.1318111,22.859995 7.7728186,22.859995 C6.4178162,22.859995
                          5.3198175,21.760994 5.3198171,20.40601 C5.3198175,19.052002 6.4178162,17.951994 7.7728186,17.951994 z M7.6010065,0 C9.0830011,0 10.316004,0.20300293 11.308001,0.60800171
                          C12.300005,1.0159912 13.096003,1.5220013 13.702005,2.1249981 C14.305002,2.729002 14.738001,3.3810091 14.999002,4.0790071 C15.262003,4.7770042 15.390001,5.4269972 15.390001,
                          6.0320082 C15.390001,7.0320072 15.262003,7.8539972 14.999002,8.4989862 C14.738001,9.1459885 14.414003,9.6989975 14.031,10.157981 C13.645006,10.615989 13.216005,11.006979
                          12.750002,11.326986 C12.278002,11.651999 11.835001,11.974997 11.421007,12.296988 C11.000002,12.619985 10.630007,12.990986 10.308001,13.405994 C9.9820042,13.822987
                          9.7810001,14.343983 9.6980076,14.968982 L9.6980076,16.157 L5.4749994,16.157 L5.4749994,14.750996 C5.5360041,13.855976 5.7120066,13.103992 5.9879999,12.502004 C6.2710047,
                          11.896994 6.5999994,11.379995 6.9749994,10.955008 C7.352006,10.525992 7.7470026,10.157981 8.163003,9.8459997 C8.5800028,9.5320053 8.9660044,9.2199936 9.3230076,8.9070053
                          C9.6770039,8.5939875 9.9640064,8.2510004 10.184,7.8749933 C10.403002,7.5020084 10.501001,7.0320072 10.480005,6.4699955 C10.480005,5.5089979 10.246004,4.8009911 9.7760029,
                          4.3429832 C9.3070002,3.8869905 8.6559992,3.656003 7.8190012,3.656003 C7.2580042,3.656003 6.7720041,3.7669954 6.3660059,3.9829988 C5.96,4.2040062 5.625001,4.4959984
                          5.3680048,4.8609886 C5.102006,5.2239952 4.9100046,5.6509962 4.7850046,6.1409864 C4.663003,6.6310062 4.5980005,7.1560001 4.5980005,7.7189875 L0,7.7189875 C0.019004822,
                          6.5939884 0.21700287,5.5629835 0.57900286,4.6249962 C0.94200182,3.6870089 1.4520037,2.8749981 2.1100013,2.1870098 C2.7680058,1.4999981 3.5600057,0.96200562 4.4879999,
                          0.57901001 C5.4180002,0.1920166 6.4540033,0 7.6010065,0 z"
                          Fill="{StaticResource BasicBrush}" HorizontalAlignment="Left" Margin="15" Stretch="Fill"  Width="22" Height="32" VerticalAlignment="Center"/>
                    <StackPanel Margin="55 15 15 15" VerticalAlignment="Top">
                        <TextBlock x:Name="SubjectTextBlock" Margin="3" Text="{Binding Occurrence.Appointment.Subject}"
                                   Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                        <TextBlock x:Name="Untitled" Margin="3" telerik:LocalizationManager.ResourceKey="Untitled"
                                   Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}"/>
                        <RadioButton  Margin="3" telerik:LocalizationManager.ResourceKey="OpenOccurrence" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsOccurrenceModeSelected, Mode=TwoWay}"
                                      telerik:StyleManager.Theme="{StaticResource Theme}" />
                        <RadioButton  Margin="3" telerik:LocalizationManager.ResourceKey="OpenSeries" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsSeriesModeSelected, Mode=TwoWay}"
                                      telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </StackPanel>
                </Grid>
     
                <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" Command="telerik:WindowCommands.Confirm" telerik:RadWindow.ResponseButton="Accept"
                                       telerik:StyleManager.Theme="{StaticResource Theme}"  >
                    </telerik:RadButton>
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" Command="telerik:WindowCommands.Cancel" telerik:RadWindow.ResponseButton="Cancel"
                                       telerik:StyleManager.Theme="{StaticResource Theme}"  >
                    </telerik:RadButton>
                </StackPanel>
            </StackPanel>
        </ControlTemplate>
     
        <ControlTemplate x:Key="RecurrenceChoiceDeletingTemplate" TargetType="local:SchedulerDialog">
            <StackPanel>
                <Grid>
                    <Path Data="M2.761554,0 L8.3200254,5.5746889 L13.895003,0.026993264 L16.482,2.6230006 L10.907351,8.1695642 L16.470552,13.748997 L13.873553,16.330997 L8.3111095,10.752727
                          L2.5870051,16.447992 L0,13.853999 L5.7238765,8.1581335 L0.1645541,2.5829935 z"
                          Fill="{StaticResource BasicBrush}" HorizontalAlignment="Left" VerticalAlignment="Center" Height="32" Width="32" Margin="15" Stretch="Fill"  />
                    <StackPanel Margin="65 15 15 15" VerticalAlignment="Top">
                        <TextBlock x:Name="SubjectTextBlock" Margin="3" Text="{Binding Occurrence.Appointment.Subject}"
                                   Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                        <TextBlock x:Name="Untitled" Margin="3" telerik:LocalizationManager.ResourceKey="Untitled"
                                   Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}"/>
                        <RadioButton  Margin="3 9 3 3" telerik:LocalizationManager.ResourceKey="DeleteOccurrence" GroupName="RecurrenceModeChoiceDel" IsChecked="{Binding IsOccurrenceModeSelected, Mode=TwoWay}"
                                      telerik:StyleManager.Theme="{StaticResource Theme}" />
                        <RadioButton  Margin="3" telerik:LocalizationManager.ResourceKey="DeleteSeries" GroupName="RecurrenceModeChoiceDel" IsChecked="{Binding IsSeriesModeSelected, Mode=TwoWay}"
                                      telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </StackPanel>
                </Grid>
                <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" Command="telerik:WindowCommands.Confirm" telerik:RadWindow.ResponseButton="Accept"
                                       telerik:StyleManager.Theme="{StaticResource Theme}"  >
                    </telerik:RadButton>
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" Command="telerik:WindowCommands.Cancel" telerik:RadWindow.ResponseButton="Cancel"
                                       telerik:StyleManager.Theme="{StaticResource Theme}"  >
                    </telerik:RadButton>
                </StackPanel>
            </StackPanel>
        </ControlTemplate>
     
        <ControlTemplate x:Key="RecurrenceChoiceResizeTemplate" TargetType="local:SchedulerDialog">
            <StackPanel>
                <StackPanel Margin="15 15 15 15" VerticalAlignment="Top">
                    <TextBlock x:Name="SubjectTextBlock" Margin="3" Text="{Binding Occurrence.Appointment.Subject}"
                               Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                    <TextBlock x:Name="Untitled" Margin="3" telerik:LocalizationManager.ResourceKey="Untitled"
                               Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}"/>
                    <TextBlock Margin="3" telerik:LocalizationManager.ResourceKey="ResizeRecurringItemQuestion" TextWrapping="Wrap"/>
                    <RadioButton Margin="3 9 3 3" telerik:LocalizationManager.ResourceKey="ResizeOccurrence" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsOccurrenceModeSelected, Mode=TwoWay}"
                                 telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <RadioButton Margin="3" telerik:LocalizationManager.ResourceKey="ResizeSeries" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsSeriesModeSelected, Mode=TwoWay}"
                                 telerik:StyleManager.Theme="{StaticResource Theme}" />
                </StackPanel>
                <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" Command="telerik:WindowCommands.Confirm" telerik:RadWindow.ResponseButton="Accept"
                                       telerik:StyleManager.Theme="{StaticResource Theme}"  >
                    </telerik:RadButton>
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" Command="telerik:WindowCommands.Cancel" telerik:RadWindow.ResponseButton="Cancel"
                                       telerik:StyleManager.Theme="{StaticResource Theme}"  >
                    </telerik:RadButton>
                </StackPanel>
            </StackPanel>
        </ControlTemplate>
     
        <ControlTemplate x:Key="RecurrenceChoiceDragDropTemplate" TargetType="local:SchedulerDialog">
            <StackPanel>
                <StackPanel Margin="15 15 15 15">
                    <TextBlock x:Name="SubjectTextBlock" Margin="3" Text="{Binding Occurrence.Appointment.Subject}"
                               Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource NullToVisibilityConverter}}" />
                    <TextBlock x:Name="Untitled" Margin="3" telerik:LocalizationManager.ResourceKey="Untitled"
                               Visibility="{Binding Occurrence.Appointment.Subject, Converter={StaticResource InvertedNullToVisibilityConverter}}"/>
                    <TextBlock  Margin="3" telerik:LocalizationManager.ResourceKey="DragRecurringItemQuestion" TextWrapping="Wrap" />
                    <RadioButton  Margin="3 9 3 3" telerik:LocalizationManager.ResourceKey="DragDropOccurrence" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsOccurrenceModeSelected, Mode=TwoWay}"
                                  telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <RadioButton  Margin="3" telerik:LocalizationManager.ResourceKey="DragDropSeries" GroupName="RecurrenceModeChoice" IsChecked="{Binding IsSeriesModeSelected, Mode=TwoWay}"
                                  telerik:StyleManager.Theme="{StaticResource Theme}" />
                </StackPanel>
                <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok" Command="telerik:WindowCommands.Confirm" telerik:RadWindow.ResponseButton="Accept"
                                       telerik:StyleManager.Theme="{StaticResource Theme}"  >
                    </telerik:RadButton>
                    <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel" Command="telerik:WindowCommands.Cancel" telerik:RadWindow.ResponseButton="Cancel"
                                       telerik:StyleManager.Theme="{StaticResource Theme}"  >
                    </telerik:RadButton>
                </StackPanel>
            </StackPanel>
        </ControlTemplate>
     
        <Style x:Key="RecurrenceChoiceDialogStyle" TargetType="local:SchedulerDialog">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="Width" Value="300" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="AppointmentRecurrence" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template" Value="{StaticResource RecurrenceChoiceTemplate}" />
        </Style>
     
        <Style x:Key="RecurrenceChoiceDeleteDialogStyle" TargetType="local:SchedulerDialog">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="Width" Value="300" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="AppointmentRecurrence" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template" Value="{StaticResource RecurrenceChoiceDeletingTemplate}" />
        </Style>
     
        <Style x:Key="RecurrenceChoiceResizeDialogStyle" TargetType="local:SchedulerDialog">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="Width" Value="350" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="AppointmentRecurrence" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template" Value="{StaticResource RecurrenceChoiceResizeTemplate}" />
        </Style>
     
        <Style x:Key="RecurrenceChoiceDragDropDialogStyle" TargetType="local:SchedulerDialog">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="Width" Value="350" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="AppointmentRecurrence" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template" Value="{StaticResource RecurrenceChoiceDragDropTemplate}" />
        </Style>
     
     
        <!-- << DIALOGS -->
        <!-- TimeRuler -->
        <Style x:Key="GoToDayButtonStyle" TargetType="telerik:RadButton">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="BorderThickness" Value="1 1 1 0" />
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadButton">
                        <Border x:Name="Border" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
     
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
     
                            <ContentControl x:Name="Content" Content="{TemplateBinding Content}" Margin="-2" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{TemplateBinding Foreground}" />
                        </Border>
     
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="GoToDayVerticalButtonStyle" TargetType="telerik:RadButton">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadButton">
                        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
     
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
     
                            <ContentControl x:Name="Content" Content="{TemplateBinding Content}" Margin="-2" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{TemplateBinding Foreground}"/>
                        </Border>
     
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="GoToDayTodayButtonStyle" TargetType="telerik:RadButton">
            <Setter Property="Foreground" Value="{StaticResource AccentBrush}" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="BorderThickness" Value="1 1 1 0" />
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadButton">
                        <Border x:Name="Border" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
     
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
     
                            <ContentPresenter Margin="-2" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="GoToDayTodayVerticalButtonStyle" TargetType="telerik:RadButton">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadButton">
                        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
     
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
     
                            <ContentControl x:Name="Content" Content="{TemplateBinding Content}" Margin="-2" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{TemplateBinding Foreground}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="ExpandMonthViewButtonStyle" TargetType="telerik:RadToggleButton">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="IsTabStop" Value="False" />
            <Setter Property="Margin" Value="3 2 3 4" />
            <Setter Property="MinWidth" Value="10" />
            <Setter Property="MinHeight" Value="10" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadToggleButton">
                        <Grid x:Name="Root">
     
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="CheckStates">
                                    <VisualState x:Name="Checked">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0:0:0.0" Storyboard.TargetName="Collapse" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0:0:0.0" Storyboard.TargetName="Expand" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unchecked"/>
                                    <VisualState x:Name="Indeterminate">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0:0:0.0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
     
                            <Border x:Name="Border" Background="{TemplateBinding Background}" />
                            <Path x:Name="Expand" Data="M0,0 L5,0 L2.5,2.5 Z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            <Path x:Name="Collapse" Visibility="Collapsed" Data="M0,2.5 L2.5,0 L5,2.5 Z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                        </Grid>
     
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="TimeRulerGroupItemStyle" TargetType="local:TimeRulerGroupItem">
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="FontFamily" Value="Segoe UI Light" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="HorizontalContentAlignment" Value="Left" />
            <Setter Property="VerticalContentAlignment" Value="Top" />
            <Setter Property="Margin" Value="0 0 -1 -1" />
            <Setter Property="Padding" Value="4 2" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerGroupItem">
                        <telerik:RadButton Style="{StaticResource GoToDayButtonStyle}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                                           Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                           VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Command="local:RadScheduleViewCommands.SetDayViewMode"
                                           CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                            <ContentPresenter x:Name="Content" />
                        </telerik:RadButton>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="TimeRulerGroupItemStyle_Vertical" TargetType="local:TimeRulerGroupItem" BasedOn="{StaticResource TimeRulerGroupItemStyle}">
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="VerticalAlignment" Value="Stretch" />
            <Setter Property="HorizontalContentAlignment" Value="Left" />
            <Setter Property="VerticalContentAlignment" Value="Top" />
            <Setter Property="Orientation" Value="Vertical" />
            <Setter Property="Margin" Value="0 0 -1 -1" />
            <Setter Property="Padding" Value="2 4" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerGroupItem">
                        <telerik:RadButton Style="{StaticResource GoToDayVerticalButtonStyle}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                                           Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                           VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Command="local:RadScheduleViewCommands.SetDayViewMode"
                                           CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                            <ContentPresenter x:Name="Content" />
                        </telerik:RadButton>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="MajorHorizontalTimeRulerItemStyle" TargetType="local:TimeRulerItem">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="FontFamily" Value="Segoe UI Light" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="BorderThickness" Value="1 0 0 0" />
            <Setter Property="VerticalContentAlignment" Value="Top" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="Padding" Value="2 0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerItem">
                        <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="MinorHorizontalTimeRulerItemStyle" TargetType="local:TimeRulerItem">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="FontFamily" Value="Segoe UI Light" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="BorderThickness" Value="1 0 0 0" />
            <Setter Property="VerticalContentAlignment" Value="Top" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="Padding" Value="2 0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerItem">
                        <Grid>
                            <Border Height="5" VerticalAlignment="Bottom" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="MajorVerticalTimeRulerItemStyle" TargetType="local:TimeRulerItem">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="FontFamily" Value="Segoe UI Light" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="BorderThickness" Value="0 1 0 0" />
            <Setter Property="VerticalContentAlignment" Value="Top" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="Padding" Value="2 0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerItem">
                        <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="MinorVerticalTimeRulerItemStyle" TargetType="local:TimeRulerItem">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="FontFamily" Value="Segoe UI Light" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="BorderThickness" Value="0 1 0 0" />
            <Setter Property="VerticalContentAlignment" Value="Top" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="Padding" Value="2 0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerItem">
                        <Grid>
                            <Border Width="20" HorizontalAlignment="Right" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="TimeRulerLineStyle" TargetType="local:TimeRulerLine">
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerLine">
     
                        <Border x:Name="LineVisual" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="0 1 0 0">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="OrientationStates">
                                    <VisualState x:Name="Horizontal">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LineVisual" Storyboard.TargetProperty="BorderThickness">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="1 0 0 0" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Vertical" />
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="TimeRulerMonthViewGroupItemStyle" TargetType="local:TimeRulerMonthViewGroupItem">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="FontFamily" Value="Segoe UI Light" />
            <Setter Property="FontSize" Value="21" />
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="HorizontalContentAlignment" Value="Right" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="BorderThickness" Value="0 0 1 0" />
            <Setter Property="Margin" Value="0" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerMonthViewGroupItem">
                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="TimeRulerMonthViewItemStyle" TargetType="local:TimeRulerMonthViewItem">
            <Setter Property="Margin" Value="0 -1 -1 0" />
            <Setter Property="FontFamily" Value="Segoe UI" />
            <Setter Property="FontSize" Value="20" />
            <Setter Property="HorizontalContentAlignment" Value="Right" />
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerMonthViewItem">
                        <Grid>
                            <telerik:RadButton Padding="0" VerticalAlignment="Top" BorderThickness="1 1 0 0" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                               VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" FontSize="18" Height="24" Style="{StaticResource GoToDayButtonStyle}"
                                               Command="local:RadScheduleViewCommands.SetDayViewMode" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                                <ContentPresenter Margin="{TemplateBinding Padding}" />
                            </telerik:RadButton>
                            <telerik:RadToggleButton Visibility="{Binding ExpandButtonVisibility}" IsChecked="{Binding IsExpanded, Mode=TwoWay}" Style="{StaticResource ExpandMonthViewButtonStyle}"
                                                     HorizontalAlignment="Right" VerticalAlignment="Bottom" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Style x:Key="TimeRulerMonthViewTodayItemStyle" TargetType="local:TimeRulerMonthViewItem">
            <Setter Property="Margin" Value="0 -1 -1 0" />
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="HorizontalContentAlignment" Value="Right" />
            <Setter Property="Foreground" Value="{StaticResource AccentBrush}" />
            <Setter Property="FontFamily" Value="Segoe UI" />
            <Setter Property="FontSize" Value="20" />
            <Setter Property="Canvas.ZIndex" Value="1" />
     
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:TimeRulerMonthViewItem">
                        <Grid>
                            <Border BorderBrush="{StaticResource BasicBrush}" BorderThickness="{StaticResource HorizontalGroupHeaderTodayBorderThickness}" />
                            <telerik:RadButton Padding="0" VerticalAlignment="Top" BorderThickness="1 1 0 0"  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                               VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" FontSize="18" Height="24" Style="{StaticResource GoToDayTodayButtonStyle}"
                                               Command="local:RadScheduleViewCommands.SetDayViewMode" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.DateTime.Date}">
                                <ContentControl Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Foreground="{TemplateBinding Foreground}" />
                            </telerik:RadButton>
                            <telerik:RadToggleButton Visibility="{Binding ExpandButtonVisibility}" IsChecked="{Binding IsExpanded, Mode=TwoWay}" Style="{StaticResource ExpandMonthViewButtonStyle}"
                                                     HorizontalAlignment="Right" VerticalAlignment="Bottom" />
                            <Border Width="1" Margin="1 0 0 0" Background="{StaticResource AccentBrush}" HorizontalAlignment="Left" VerticalAlignment="Stretch" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <local:TimeRulerItemTemplateSelector x:Key="TimeRulerItemTemplateSelector">
            <local:TimeRulerItemTemplateSelector.HorizontalDayMajorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" Margin="2" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.HorizontalDayMajorItemTemplate>
            <local:TimeRulerItemTemplateSelector.HorizontalDayMinorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" Margin="2" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.HorizontalDayMinorItemTemplate>
            <local:TimeRulerItemTemplateSelector.HorizontalWeekMajorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" Margin="2" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.HorizontalWeekMajorItemTemplate>
            <local:TimeRulerItemTemplateSelector.HorizontalWeekMinorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" Margin="2" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.HorizontalWeekMinorItemTemplate>
            <local:TimeRulerItemTemplateSelector.VerticalDayMajorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" MinWidth="58" Margin="0 2" TextAlignment="Right" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.VerticalDayMajorItemTemplate>
            <local:TimeRulerItemTemplateSelector.VerticalDayMinorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" MinWidth="58" Margin="0 2" TextAlignment="Right" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.VerticalDayMinorItemTemplate>
            <local:TimeRulerItemTemplateSelector.VerticalWeekMajorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" MinWidth="58" Margin="0 2" TextAlignment="Right" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.VerticalWeekMajorItemTemplate>
            <local:TimeRulerItemTemplateSelector.VerticalWeekMinorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" MinWidth="58" Margin="0 2" TextAlignment="Right" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.VerticalWeekMinorItemTemplate>
            <local:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" Margin="2 1" TextAlignment="Left" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
            <local:TimeRulerItemTemplateSelector.HorizontalTimelineMajorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" Margin="2" TextAlignment="Left" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.HorizontalTimelineMajorItemTemplate>
            <local:TimeRulerItemTemplateSelector.HorizontalTimelineMinorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" Margin="2" TextAlignment="Left" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.HorizontalTimelineMinorItemTemplate>
            <local:TimeRulerItemTemplateSelector.VerticalTimelineGroupTemplate>
                <DataTemplate>
                    <telerikPrimitives:LayoutTransformControl VerticalAlignment="Top">
                        <telerikPrimitives:LayoutTransformControl.LayoutTransform>
                            <RotateTransform Angle="-90" />
                        </telerikPrimitives:LayoutTransformControl.LayoutTransform>
                        <TextBlock Text="{Binding FormattedValue}" Margin="2 1" Height="16" TextAlignment="Right" />
                    </telerikPrimitives:LayoutTransformControl>
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.VerticalTimelineGroupTemplate>
            <local:TimeRulerItemTemplateSelector.VerticalTimelineMajorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" MinWidth="58" Margin="0 2" TextAlignment="Right" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.VerticalTimelineMajorItemTemplate>
            <local:TimeRulerItemTemplateSelector.VerticalTimelineMinorItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" MinWidth="58" Margin="0 2" TextAlignment="Right" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.VerticalTimelineMinorItemTemplate>
            <local:TimeRulerItemTemplateSelector.MonthGroupTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" Margin="6 2" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.MonthGroupTemplate>
            <local:TimeRulerItemTemplateSelector.MonthItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding FormattedValue}" Margin="6 2" />
                </DataTemplate>
            </local:TimeRulerItemTemplateSelector.MonthItemTemplate>
        </local:TimeRulerItemTemplateSelector>
     
        <local:OrientedTimeRulerItemStyleSelector x:Key="TimeRulerItemStyleSelector" MonthViewGroupStyle="{StaticResource TimeRulerMonthViewGroupItemStyle}" 
                                                  MonthViewTickStyle="{StaticResource TimeRulerMonthViewItemStyle}" MonthViewTodayTickStyle="{StaticResource TimeRulerMonthViewTodayItemStyle}"
                                                  HorizontalGroupItemStyle="{StaticResource TimeRulerGroupItemStyle}" VerticalGroupItemStyle="{StaticResource TimeRulerGroupItemStyle_Vertical}"
                                                  MajorHorizontalTickStyle="{StaticResource MajorHorizontalTimeRulerItemStyle}" MajorVerticalTickStyle="{StaticResource MajorVerticalTimeRulerItemStyle}"
                                                  MinorHorizontalTickStyle="{StaticResource MinorHorizontalTimeRulerItemStyle}" MinorVerticalTickStyle="{StaticResource MinorVerticalTimeRulerItemStyle}"
                                                  HorizontalLineStyle="{StaticResource TimeRulerLineStyle}" VerticalLineStyle="{StaticResource TimeRulerLineStyle}">
        </local:OrientedTimeRulerItemStyleSelector>
     
     
        <!-- Group headers -->
        <ControlTemplate x:Key="GroupHeaderButtonControlTemplate" TargetType="local:GroupHeaderButton">
            <Grid>
     
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommonStates">
                        <VisualState x:Name="Normal" />
                        <VisualState x:Name="CommandMouseOver">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="CommandPressed">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource BasicBrush}" />
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="TodayStates">
                        <VisualState x:Name="NotToday" />
                        <VisualState x:Name="Today">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AccentBrush}" />
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="OrientationStates">
                        <VisualState x:Name="Horizontal">
                            <Storyboard>
                                <DoubleAnimation To="-90" Duration="0" Storyboard.TargetName="Transform" Storyboard.TargetProperty="Angle" />
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Vertical" />
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
                <telerik:LayoutTransformControl x:Name="Visuals">
                    <telerik:LayoutTransformControl.LayoutTransform>
                        <RotateTransform x:Name="Transform" Angle="0" />
                    </telerik:LayoutTransformControl.LayoutTransform>
                    <Grid>
                        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}"/>
                    </Grid>
                </telerik:LayoutTransformControl>
     
                <ContentControl x:Name="Content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="-1" Foreground="{TemplateBinding Foreground}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
     
            </Grid>
        </ControlTemplate>
     
        <Style x:Key="GroupHeaderButtonStyle" TargetType="local:GroupHeaderButton">
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="Margin" Value="0" />
            <Setter Property="Template" Value="{StaticResource GroupHeaderButtonControlTemplate}" />
        </Style>
     
        <local:NullToBooleanConverter x:Key="NullToBooleanConverter" />
     
        <ControlTemplate x:Key="GroupHeaderTemplate" TargetType="local:GroupHeader">
            <Grid>
     
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="OrientationStates">
                        <VisualState x:Name="Horizontal">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="VerticalAlignment">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Stretch" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="HorizontalAlignment">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Left" />
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Vertical" />
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="DayStates">
                        <VisualState x:Name="NormalDay" />
                        <VisualState x:Name="Today">
                            <Storyboard>
                                <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GroupHeaderBorderBrush_Today}" />
                                </ObjectAnimationUsingKeyFrames>-->
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderThickness">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource HorizontalGroupHeaderTodayBorderThickness}" />
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="TodayHorizontal">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="VerticalAlignment">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Stretch" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="HorizontalAlignment">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Left" />
                                </ObjectAnimationUsingKeyFrames>
                                <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GroupHeaderBorderBrush_Today}" />
                                </ObjectAnimationUsingKeyFrames>-->
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderThickness">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource VerticalGroupHeaderTodayBorderThickness}" />
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
     
     
                <Border x:Name="Border" IsHitTestVisible="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="1" Background="{TemplateBinding Background}">
                </Border>
     
                <local:GroupHeaderButton x:Name="Header" VerticalAlignment="Top" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Command="{TemplateBinding Command}"
                                         CommandParameter="{TemplateBinding CommandParameter}" IsToday="{TemplateBinding IsToday}" Orientation="{TemplateBinding Orientation}"
                                         FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}"/>
            </Grid>
        </ControlTemplate>
     
        <Style x:Key="GroupHeaderBaseStyle" TargetType="local:GroupHeader">
            <Setter Property="Foreground" Value="{StaticResource StrongBrush}" />
            <Setter Property="BorderBrush" Value="#bfbfbf" />
            <Setter Property="Background" Value="{x:Null}" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="FontFamily" Value="Segoe UI Light" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="Canvas.ZIndex" Value="-2" />
            <Setter Property="Template" Value="{StaticResource GroupHeaderTemplate}" />
        </Style>
     
        <Style TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}" />
     
        <Style x:Key="HorizontalGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 -1 0" />
            <Setter Property="Padding" Value="-1 0 0 0" />
            <Setter Property="Canvas.ZIndex" Value="-2" />
        </Style>
        <Style x:Key="HorizontalTodayGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 -1 0" />
            <Setter Property="Padding" Value="-1 0 0 0" />
            <Setter Property="Canvas.ZIndex" Value="-1" />
        </Style>
        <Style x:Key="HorizontalBottomLevelGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 -1 0" />
            <Setter Property="Padding" Value="0 0 5 0" />
            <Setter Property="Canvas.ZIndex" Value="-2" />
        </Style>
        <Style x:Key="HorizontalBottomLevelTodayGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 -1 0" />
            <Setter Property="Padding" Value="1 0 5 0" />
            <Setter Property="Canvas.ZIndex" Value="-1" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
        </Style>
        <Style x:Key="VerticalGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 0 -1" />
            <Setter Property="Padding" Value="0 -1 0 0" />
            <Setter Property="Canvas.ZIndex" Value="-2" />
        </Style>
        <Style x:Key="VerticalTodayGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 0 -1" />
            <Setter Property="Canvas.ZIndex" Value="-1" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
        </Style>
        <Style x:Key="VerticalBottomLevelGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 0 -1" />
            <Setter Property="Padding" Value="0 0 0 5" />
            <Setter Property="Canvas.ZIndex" Value="-2" />
        </Style>
        <Style x:Key="VerticalBottomLevelTodayGroupHeaderStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 0 -1" />
            <Setter Property="Padding" Value="0 1 0 5" />
            <Setter Property="Canvas.ZIndex" Value="-1" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}" />
        </Style>
        <Style x:Key="MonthViewWeekGroupStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 0 -1" />
            <Setter Property="Padding" Value="0 -1 0 0" />
        </Style>
        <Style x:Key="MonthViewBottomLevelWeekGroupStyle" TargetType="local:GroupHeader" BasedOn="{StaticResource GroupHeaderBaseStyle}">
            <Setter Property="Margin" Value="0 0 0 -1" />
            <Setter Property="Padding" Value="0 21 0 18" />
            <Setter Property="MinHeight" Value="85" />
        </Style>
     
        <local:OrientedGroupHeaderStyleSelector x:Key="GroupHeaderStyleSelector" HorizontalStyle="{StaticResource HorizontalGroupHeaderStyle}"
                                                HorizontalTodayStyle="{StaticResource HorizontalTodayGroupHeaderStyle}" HorizontalBottomLevelStyle="{StaticResource HorizontalBottomLevelGroupHeaderStyle}"
                                                HorizontalTodayBottomLevelStyle="{StaticResource HorizontalBottomLevelTodayGroupHeaderStyle}" VerticalStyle="{StaticResource VerticalGroupHeaderStyle}"
                                                VerticalTodayStyle="{StaticResource VerticalTodayGroupHeaderStyle}" VerticalBottomLevelStyle="{StaticResource VerticalBottomLevelGroupHeaderStyle}"
                                                VerticalTodayBottomLevelStyle="{StaticResource VerticalBottomLevelTodayGroupHeaderStyle}" MonthViewWeekGroupStyle="{StaticResource MonthViewWeekGroupStyle}"
                                                MonthViewBottomLevelWeekGroupStyle="{StaticResource MonthViewBottomLevelWeekGroupStyle}">
        </local:OrientedGroupHeaderStyleSelector>
     
        <local:GroupHeaderTemplateSelector x:Key="GroupHeaderContentTemplateSelector">
            <local:GroupHeaderTemplateSelector.HorizontalTemplate>
                <DataTemplate>
                    <ContentPresenter Content="{Binding FormattedName}" Height="16" Margin="4" />
                </DataTemplate>
            </local:GroupHeaderTemplateSelector.HorizontalTemplate>
            <local:GroupHeaderTemplateSelector.VerticalTemplate>
                <DataTemplate>
                    <telerikPrimitives:LayoutTransformControl VerticalAlignment="Top">
                        <telerikPrimitives:LayoutTransformControl.LayoutTransform>
                            <RotateTransform Angle="-90" />
                        </telerikPrimitives:LayoutTransformControl.LayoutTransform>
                        <ContentPresenter Content="{Binding FormattedName}" Margin="4" Height="16"  />
                    </telerikPrimitives:LayoutTransformControl>
                </DataTemplate>
            </local:GroupHeaderTemplateSelector.VerticalTemplate>
        </local:GroupHeaderTemplateSelector>
     
        <!-- AppointmentItem -->
        <Style x:Key="DeleteButtonStyle" TargetType="telerik:RadButton">
            <Setter Property="Width" Value="10" />
            <Setter Property="Height" Value="10" />
            <Setter Property="Margin" Value="1 4 2 0" />
            <Setter Property="HorizontalAlignment" Value="Right" />
            <Setter Property="VerticalAlignment" Value="Top" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:RadButton">
                        <Grid>
     
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="1" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity">
                                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="1" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
     
     
                            <Rectangle Fill="Transparent" />
                            <Ellipse Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Fill="{StaticResource StrongBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                            <Path x:Name="Icon" Stroke="{StaticResource MainBrush}" StrokeThickness="1.5" Data="M0,0 L6,6 M6,0 L0,6" Width="6" Height="6" Stretch="None"
                                  HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0.7"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
     
        <Storyboard x:Key="MouseOverEnterStoryboard">
            <ObjectAnimationUsingKeyFrames Duration="0:0:0.400" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimation BeginTime="0:0:0.200" Duration="0:0:0.200" To="1" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="Opacity" />
        </Storyboard>
        <Storyboard x:Key="MouseOverExitStoryboard">
            <ObjectAnimationUsingKeyFrames Duration="0:0:0.200" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.200">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimation BeginTime="0:0:0.0" Duration="0:0:0.200" To="0" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="Opacity" />
        </Storyboard>
     
        <ControlTemplate x:Key="AppointmentItemHorizontalControlTemplate" TargetType="local:AppointmentItem">
            <Grid x:Name="Root">
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommonStates">
                        <VisualState x:Name="Disabled" />
                        <VisualState x:Name="Normal">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Duration="0:0:0.200" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0.200">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <DoubleAnimation BeginTime="0:0:0.0" Duration="0:0:0.200" To="0" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="Opacity" />
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="MouseOver">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Duration="0:0:0.400" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <DoubleAnimation BeginTime="0:0:0.200" Duration="0:0:0.200" To="1" Storyboard.TargetName="MouseOverGrid" Storyboard.TargetProperty="Opacity" />
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="ReadOnly">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Duration="0:0:0.0" Storyboard.TargetName="ReadOnlyVisual" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0.0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="InlineEditing" />
                    </VisualStateGroup>
                    <VisualStateGroup x:Name="SelectionStates">
                        <VisualState x:Name="Unselected" />
                        <VisualState x:Name="Selected">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Duration="0:0:0.200" Storyboard.TargetName="SelectionVisual" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0.200">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
     
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
     
                <!--Small appointment rendering visual-->
                <Grid Grid.Row="1" Margin="1 0">
                    <!--<Border x:Name="LineVisual" Height="3" Margin="{TemplateBinding DurationMarkerMargin}" Background="{StaticResource StrongBrush}" />-->
                    <Border x:Name="PART_TimeMarker" Height="3" Margin="{TemplateBinding DurationMarkerMargin}"  Background="{Binding Path=TimeMarker.TimeMarkerBrush}"
                            Visibility="{Binding Path=TimeMarker, Converter={StaticResource NullToVisibilityConverter}}" />
                </Grid>
     
                <Grid Grid.Row="0">
                    <telerik:CommandManager.InputBindings>
                        <telerik:InputBindingCollection>
                            <telerik:MouseBinding Gesture="LeftDoubleClick" Command="local:RadScheduleViewCommands.EditAppointment" />
                        </telerik:InputBindingCollection>
                    </telerik:CommandManager.InputBindings>
     
                    <Border x:Name="BackgroundBorder" Background="{TemplateBinding Background}" />
                    <Border x:Name="SelectionVisual" Visibility="Collapsed" Background="{StaticResource StrongBrush}" Opacity="0.3" />
                    <Border x:Name="PART_Category" Background="{Binding Path=Category.CategoryBrush}" Margin="1"/>
                    <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1"/>
                    <Rectangle x:Name="ReadOnlyVisual" Visibility="Collapsed" Fill="{StaticResource MarkerBrush}" Opacity="0.3" />
     
                    <!-- Programme Label-->
                    <Grid HorizontalAlignment="Right" VerticalAlignment="Top">
                        <Path Data="M15,0 L30,10 L30,22 L0,0z" Width="43" Height="33" HorizontalAlignment="Right" VerticalAlignment="Top"
                                  Fill="{Binding Appointment.Subject, Converter={StaticResource SubjectToBackgroundConverter}}" Stretch="Fill" />
                        <TextBlock HorizontalAlignment="Right" Height="12" TextWrapping="Wrap" Text="{Binding Appointment.Subject, Converter={StaticResource SubjectToTypeConverter}}" 
                                       VerticalAlignment="Top" Margin="0 8 0 0" FontFamily="Segoe UI" FontSize="8" RenderTransformOrigin="0.5,0.5" Foreground="White" FontWeight="Bold">
                                <TextBlock.RenderTransform>
                                    <CompositeTransform Rotation="38"/>
                                </TextBlock.RenderTransform>
                        </TextBlock>
                    </Grid>
     
                    <Grid Margin="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
     
                        <Path Grid.Column="0" Data="M-919.69031,2003.9496 L-919.69031,2010.7375 L-923.7619,2007.4564 z" Fill="{StaticResource StrongBrush}" Margin="3 0"
                              HorizontalAlignment="Left" Height="7" Stretch="Fill" VerticalAlignment="Center" Width="4" Visibility="{TemplateBinding StartIndicatorVisibility}"/>
     
                        <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="0 6 0 0" Orientation="Horizontal">
                            <!--LOGO auto-->
                            <Image x:Name="Logo" Width="0" Height="0" Margin="0" Source="{Binding Subject, Converter={StaticResource SubjectToImageConverter}}" HorizontalAlignment="Left" Opacity="0"/>
                            <Image x:Name="RecurrenceMark" Grid.Column="0" Margin="2 2 1 1" Width="10" Height="10" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Recurrence}"
                                   Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsExeptionToVisibilityConverter}}"/>
                            <Image x:Name="ExceptionMark" Grid.Column="0" Margin="2 2 1 1" Width="10" Height="10" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Exception}"
                                   Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsOccurenceToVisibilityConverter}}" />
                            <ContentControl x:Name="HighImportanceMark" Template="{StaticResource HighImportanceMarkTemplate}" Margin="2 1 1 0" Style="{StaticResource ImportanceMarkContentControlStyle}"
                                            Visibility="{Binding Importance, Converter={StaticResource EnumToVisibilityConverter}, ConverterParameter=High}"   />
                            <ContentControl x:Name="LowImportanceMark" Template="{StaticResource LowImportanceMarkTemplate}" Margin="2 1 1 0" Style="{StaticResource ImportanceMarkContentControlStyle}"
                                            Visibility="{Binding Importance, Converter={StaticResource EnumToVisibilityConverter}, ConverterParameter=Low}"/>
                        </StackPanel>
     
                        <ContentPresenter Grid.Column="2" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
     
                        <Path Grid.Column="3" Data="M1109.0469,332.70313 L1113.0469,336.29663 L1109.0469,339.68823 z" Margin="3 0" Fill="{StaticResource MainBrush}" Opacity="0.7"
                              HorizontalAlignment="Right" Height="6.984" Stretch="Fill" VerticalAlignment="Center" Width="4" Visibility="{TemplateBinding EndIndicatorVisibility}"/>
                    </Grid>
     
                    <Grid x:Name="MouseOverGrid" Visibility="Collapsed" Opacity="0">
                        <Border x:Name="MouseOverVisual" Background="Lime" Opacity="0.3" />
                        <Border x:Name="PART_StartResizeGrip" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Stretch" Cursor="SizeWE" dragDrop:DragDropManager.AllowDrag="True" Width="6"
                                Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" />
     
                        <Border x:Name="PART_EndResizeGrip" Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Stretch" Cursor="SizeWE" dragDrop:DragDropManager.AllowDrag="True" Width="6"
                                Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
     
                        <telerik:RadButton x:Name="DeleteButton" Style="{StaticResource DeleteButtonStyle}" Command="local:RadScheduleViewCommands.DeleteAppointment" ClickMode="Press"
                                           CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="False"
                                           Visibility="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}}" />
                    </Grid>
                </Grid>