Customizing Copy Paste Template

4 posts, 0 answers
  1. Alapan
    Alapan avatar
    15 posts
    Member since:
    Jul 2011

    Posted 04 Nov 2011 Link to this post

    Hi Telerik Team,

    I have a requirement where I can modify the copy-paste template in ScheduleView. Actulally , by default , while drag drop, the appointment is showing some start time and end time based on its placement on the date. I need to show Start time and end time as 00:00 while dragging the appointment (by holding the cntrl key).

    I hope you unnderstand my problem. I am also attaching screenshot to provide you clear picture.

    Hoping for quick assistance !!!

    Thanks
    Alapan

  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 04 Nov 2011 Link to this post

    Hello Alapan,

    I suggest you use the DragDropHighlightStyle property of RadSheduleView to customize the look and feel of the drop shadow:
    For example:
    <Style x:Key="DragDropHighlightStyle" TargetType="schedulView:HighlightItem">
        <Setter Property="Background" Value="{StaticResource DecorationRectangleBackground_DragOver}" />
        <Setter Property="BorderBrush" Value="{StaticResource DecorationRectangleOuterBorder_DragOver}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Border BorderBrush="{StaticResource DecorationRectangleInnerBorder_DragOver}" BorderThickness="1" />
                             
     
                            <TextBlock x:Name="StartTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding ActualStart,StringFormat=t}" />
                             
                         
                            <TextBlock x:Name="EndTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="{Binding ActualEnd,StringFormat=t}" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    Regards,
    Rosi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Alapan
    Alapan avatar
    15 posts
    Member since:
    Jul 2011

    Posted 07 Nov 2011 Link to this post

    Hello Rosi,

    Thanks for providing me this style template. Actually I am exactly looking for this "DragDropHighlightStyle" . But it is throwing some errors when I included this style (Please find the screenshot of the error in the attachment).

    Actulay previously this style template was not present in my XAML file. So I think all the static resources and binding templates should be included.

    I am also providing you the code of my XAML file so that it can give you better picture.

    <!-- User Control Starts, all the namespaces, which has been used are declared in this tag-->
    <UserControl x:Class="DemosGroup.Scheduler.View.demosScheduleView"
            xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
            xmlns:schedule="clr-namespace:Telerik.Windows.Controls.ScheduleView;assembly=Telerik.Windows.Controls.ScheduleView"
            xmlns:scheduleView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
            xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
            xmlns:local="clr-namespace:DemosGroup.Scheduler.ViewModel;assembly=DemosGroup.Scheduler.ViewModel"
            xmlns:customstyle="clr-namespace:DemosGroup.Scheduler.View;assembly=DemosGroup.Scheduler.View"
            xmlns:bl="clr-namespace:DemosGroup.Scheduler.ViewModel.BL;assembly=DemosGroup.Scheduler.ViewModel"
            xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
            xmlns:extended="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
            xmlns:tab="clr-namespace:DemosGroup.Scheduler.View.Controls;assembly=DemosGroup.Scheduler.View.Controls"
            xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
            xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
            >
     
        <!--Resources like brushes and style selectors has been declared in this section-->
        <UserControl.Resources>
     
            <!--start Teleric libraries for binding data-->
            <telerik:Office_BlackTheme x:Key="Theme" />
            <telerik:InvertedBooleanConverter x:Key="InvertedBooleanConverter" />
            <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
            <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter" />
            <telerik:InvertedVisibilityConverter x:Key="InvertedVisibilityConverter" />
            <telerik:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
            <telerik:InvertedNullToVisibilityConverter x:Key="InvertedNullToVisibilityConverter" />
            <telerik:ImportanceToBooleanConverter x:Key="ImportanceToBooleanConverter" />
            <telerik:ResourcesSeparatorConverter x:Key="ResourcesSeparatorConverter" />
            <telerik:BoolToInputModeConverter x:Key="BoolToInputModeConverter" />
            <telerik:LocalizationManager x:Key="LocalizationManager"/>
     
            <!-- Telerik Code Starts-->
            <scheduleView:RecurrenceStateIsExeptionToVisibilityConverter x:Key="RecurrenceStateIsExeptionToVisibilityConverter" />
            <scheduleView:RecurrenceStateIsOccurenceToVisibilityConverter x:Key="RecurrenceStateIsOccurenceToVisibilityConverter" />
            <!-- Telerik Code Ends-->
     
            <!--local view model class is used to bind the data on to scheduleview control-->
            <!--<local:SchedulerViewModel x:Key="ViewModel" />-->
     
            <!--start brushes used for styling-->
            <SolidColorBrush x:Key="MainBackground" Color="#FF000000" />
            <LinearGradientBrush x:Key="SubHeadingBackground" EndPoint="0.5,1" MappingMode="RelativeToBoundingBox"
                    StartPoint="0.5,0">
                <GradientStop Color="#FF4B4B4B" Offset="1" />
                <GradientStop Color="#FF6E6E6E" />
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="SelectionOptionBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF1E1E1E" Offset="0" />
                <GradientStop Color="#FF040404" Offset="1" />
            </LinearGradientBrush>
            <SolidColorBrush x:Key="SelectionOptionBorderBrush" Color="#FF313132" />
            <SolidColorBrush x:Key="RadScheduleForeground" Color="Black" />
            <!--end brushes-->
     
            <!--Telrik Control Template Brushes Starts -->
            <LinearGradientBrush x:Key="AppointmentItemBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFDCEBFC"/>
                <GradientStop Color="#FFC1DBFC" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="AppointmentItemOuterBorder_Selected" Color="#FF7DA2CE" />
            <LinearGradientBrush x:Key="AppointmentItemInnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFEBF4FD"/>
                <GradientStop Color="#FFDBEAFD" Offset="1"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="AppointmentItemInnerBorder" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFCFDFE"/>
                <GradientStop Color="#FFF2F7FE" Offset="1"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="AppointmentItemBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFDCEBFC"/>
                <GradientStop Color="#FFC1DBFC" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="AppointmentItemOuterBorder_MouseOver" Color="#FFB8D6FB" />
            <LinearGradientBrush x:Key="AppointmentItemInnerBorder_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFEBF4FD"/>
                <GradientStop Color="#FFDBEAFD" Offset="1"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="AppoinmtentItemBackground_ReadOnly" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#B2CDCDCD" Offset="0"/>
                <GradientStop Color="#65CDCDCD" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="AppointmentItemIndicatorFill" Color="#FF000000" />
            <ImageSource x:Key="AppointmentItem_Recurrence">/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/AppointmentException.png</ImageSource>
            <ImageSource x:Key="AppointmentItem_Exception">/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/AppointmentRecurrence.png</ImageSource>
            <SolidColorBrush x:Key="AppointmentItemResizeGripBackground" Color="#FFDCEBFC" />
            <SolidColorBrush x:Key="AppointmentItemResizeGripStroke" Color="#FF839AB5" />
            <LinearGradientBrush x:Key="AppointmentItemDeleteIconStroke" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF4F637C" Offset="0"/>
                <GradientStop Color="#FF8CA0B9" Offset="1"/>
            </LinearGradientBrush>
            <!--Telrik Control Template Brushes Ends -->
     
     
            <!-- Telerik Control Template Starts (To hide the delte button)   -->
            <Storyboard x:Key="MouseOverEnterStoryboard">
                <ObjectAnimationUsingKeyFrames Duration="0:0:0.400" Storyboard.TargetName="MouseOverOverlay" 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="MouseOverOverlay" Storyboard.TargetProperty="Opacity" />
            </Storyboard>
            <ControlTemplate x:Key="AppointmentItemHorizontalControlTemplate" TargetType="scheduleView: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="MouseOverOverlay" 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="MouseOverOverlay" Storyboard.TargetProperty="Opacity" />
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="MouseOver">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Duration="0:0:0.400" Storyboard.TargetName="MouseOverOverlay" 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="MouseOverOverlay" 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" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="Visibility">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="Background">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemBackground_Selected}" />
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="BorderBrush">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemOuterBorder_Selected}" />
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisualInnerBorder" Storyboard.TargetProperty="BorderBrush">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemInnerBorder_Selected}" />
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <!--tool tip-->
                    <ToolTipService.ToolTip>
                        <ToolTip>
                            <Grid Width="Auto">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition></RowDefinition>
                                    <RowDefinition></RowDefinition>
                                    <RowDefinition></RowDefinition>
                                </Grid.RowDefinitions>
                                <TextBlock Margin="2" TextWrapping="Wrap" Text="{Binding Appointment.Row1}" TextTrimming="WordEllipsis" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
                                <TextBlock Margin="2" TextWrapping="Wrap" Text="{Binding Appointment.ToolTipDatesRow}" TextTrimming="WordEllipsis" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1"/>
                                <TextBlock Margin="2" TextWrapping="Wrap" Text="{Binding Appointment.CourseName}" TextTrimming="WordEllipsis" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2"/>
     
                            </Grid>
                        </ToolTip>
                    </ToolTipService.ToolTip>
                    <Grid Grid.Row="1">
     
                        <telerik:CommandManager.InputBindings>
                            <telerik:InputBindingCollection>
                                <telerik:MouseBinding Gesture="LeftDoubleClick" Command="schecduleView:RadScheduleViewCommands.EditAppointment" />
                            </telerik:InputBindingCollection>
                        </telerik:CommandManager.InputBindings>
     
                        <Border CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Border CornerRadius="1" BorderBrush="{StaticResource AppointmentItemInnerBorder}" BorderThickness="{TemplateBinding BorderThickness}" />
                        </Border>
     
                        <Border x:Name="CommonStatesVisual" Visibility="Collapsed" CornerRadius="2" Background="{StaticResource AppointmentItemBackground_MouseOver}" BorderBrush="{StaticResource AppointmentItemOuterBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Border x:Name="CommonStatesVisualInnerBorder" CornerRadius="1" BorderBrush="{StaticResource AppointmentItemInnerBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" />
                        </Border>
     
                        <Border x:Name="PART_Category" Margin="2" Background="{Binding Path=Category.CategoryBrush}" />
     
                        <Rectangle x:Name="ReadOnlyVisual" Margin="2" Visibility="Collapsed" Fill="{StaticResource AppoinmtentItemBackground_ReadOnly}" />
     
                        <Grid Margin="2">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
     
                            <Border x:Name="PART_TimeMarker" Grid.Column="0" Width="5" HorizontalAlignment="Left" Background="{Binding Path=TimeMarker.TimeMarkerBrush}" Visibility="{Binding Path=TimeMarker, Converter={StaticResource NullToVisibilityConverter}}" />
     
                            <Path Grid.Column="1" Data="M-919.69031,2003.9496 L-919.69031,2010.7375 L-923.7619,2007.4564 z" Fill="{StaticResource AppointmentItemIndicatorFill}" Margin="4 0 2 0"
                          HorizontalAlignment="Left" Height="7" Stretch="Fill" VerticalAlignment="Center" Width="4" Visibility="{TemplateBinding StartIndicatorVisibility}"/>
     
                            <StackPanel Grid.Column="2" VerticalAlignment="Top" Margin="0 3 0 0">
                                <Image x:Name="RecurrenceMark" Grid.Column="0" Margin="2 1 1 0" Width="10" Height="10" Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsExeptionToVisibilityConverter}}" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Recurrence}" />
                                <Image x:Name="ExceptionMark" Grid.Column="0" Margin="2 1 1 0" Width="10" Height="10" Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsOccurenceToVisibilityConverter}}" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Exception}" />
                            </StackPanel>
     
                            <ContentPresenter Grid.Column="3" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
     
                            <Path Grid.Column="4" Data="M1109.0469,332.70313 L1113.0469,336.29663 L1109.0469,339.68823 z" Margin="2 0 4 0" Fill="{StaticResource AppointmentItemIndicatorFill}"
                          HorizontalAlignment="Right" Height="6.984" Stretch="Fill" VerticalAlignment="Center" Width="4" Visibility="{TemplateBinding EndIndicatorVisibility}"/>
                        </Grid>
     
                        <Grid x:Name="MouseOverOverlay" Visibility="Collapsed" Opacity="0">
                            <Border x:Name="PART_StartResizeGrip" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Stretch" Cursor="SizeWE" dragDrop:RadDragAndDropManager.AllowDrag="True"
                            Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                                <StackPanel x:Name="StartResizeGrip" Margin="1"
                                    HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                        BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                        BorderThickness="0,0,1,1"
                                        Width="3" Height="3" Margin="1" />
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                        BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                        BorderThickness="0,0,1,1"
                                        Width="3" Height="3" Margin="1" />
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                        BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                        BorderThickness="0,0,1,1"
                                        Width="3" Height="3" Margin="1" />
                                </StackPanel>
                            </Border>
                            <Border x:Name="PART_EndResizeGrip" Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Stretch" Cursor="SizeWE" dragDrop:RadDragAndDropManager.AllowDrag="True"
                            Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                                <StackPanel x:Name="EndResizeGrip" Margin="1" HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                    BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                    BorderThickness="0,0,1,1"
                                    Width="3" Height="3" Margin="1" />
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                    BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                    BorderThickness="0,0,1,1"
                                    Width="3" Height="3" Margin="1" />
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                    BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                    BorderThickness="0,0,1,1"
                                    Width="3" Height="3" Margin="1" />
                                </StackPanel>
                            </Border>
     
                            <!-- NOTE: The delete button. You can remove it from this location. Visibility is changed to "Collapsed"  -->
                            <telerik:RadButton x:Name="DeleteButton" Width="11" Height="11" Margin="5 5 6 5" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top"
                                Command="local:RadScheduleViewCommands.DeleteAppointment"  ClickMode="Press"
                                CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                Visibility="Collapsed"
                                IsTabStop="False"
                                telerik:StyleManager.Theme="{StaticResource Theme}">
                                <Path Stroke="{StaticResource AppointmentItemDeleteIconStroke}" Data="M0,0 L5,5 M5,0 L0,5" />
                            </telerik:RadButton>
                        </Grid>
                    </Grid>
                </Grid>
            </ControlTemplate>
            <ControlTemplate x:Key="AppointmentItemVerticalControlTemplate" TargetType="scheduleView: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="MouseOverOverlay" 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="MouseOverOverlay" Storyboard.TargetProperty="Opacity" />
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="MouseOver">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Duration="0:0:0.400" Storyboard.TargetName="MouseOverOverlay" 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="MouseOverOverlay" 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" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="Visibility">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="Background">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemBackground_Selected}" />
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisual" Storyboard.TargetProperty="BorderBrush">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemOuterBorder_Selected}" />
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CommonStatesVisualInnerBorder" Storyboard.TargetProperty="BorderBrush">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource AppointmentItemInnerBorder_Selected}" />
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
     
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <!--tool tip-->
                    <ToolTipService.ToolTip>
                        <ToolTip>
                            <Grid Width="Auto">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="25"></RowDefinition>
                                    <RowDefinition Height="25"></RowDefinition>
                                </Grid.RowDefinitions>
                                <TextBlock Margin="2" TextWrapping="Wrap" Text="{Binding Appointment.Row1}" TextTrimming="WordEllipsis" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
                                <TextBlock Margin="2" TextWrapping="Wrap" Text="{Binding Appointment.ToolTipDatesRow}" TextTrimming="WordEllipsis" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1"/>
                            </Grid>
                        </ToolTip>
                    </ToolTipService.ToolTip>
                    <Grid Grid.Column="1">
     
                        <telerik:CommandManager.InputBindings>
                            <telerik:InputBindingCollection>
                                <telerik:MouseBinding Gesture="LeftDoubleClick" Command="local:RadScheduleViewCommands.EditAppointment" />
                            </telerik:InputBindingCollection>
                        </telerik:CommandManager.InputBindings>
     
                        <Border CornerRadius="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Border CornerRadius="1" BorderBrush="{StaticResource AppointmentItemInnerBorder}" BorderThickness="{TemplateBinding BorderThickness}" />
                        </Border>
     
                        <Border x:Name="CommonStatesVisual" Visibility="Collapsed" CornerRadius="2" Background="{StaticResource AppointmentItemBackground_MouseOver}" BorderBrush="{StaticResource AppointmentItemOuterBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Border x:Name="CommonStatesVisualInnerBorder" CornerRadius="1" BorderBrush="{StaticResource AppointmentItemInnerBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" />
                        </Border>
     
                        <Border x:Name="PART_Category" Margin="2" Background="{Binding Path=Category.CategoryBrush}" />
     
                        <Rectangle x:Name="ReadOnlyVisual" Margin="2" Visibility="Collapsed" Fill="{StaticResource AppoinmtentItemBackground_ReadOnly}" />
     
                        <Grid Margin="2">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
     
                            <Border x:Name="PART_TimeMarker" Grid.Column="0" Grid.RowSpan="3" Width="5" HorizontalAlignment="Left" Background="{Binding Path=TimeMarker.TimeMarkerBrush}" Visibility="{Binding Path=TimeMarker, Converter={StaticResource NullToVisibilityConverter}}" />
     
                            <Path Grid.ColumnSpan="3" Grid.Row="0" Data="M3.5,0 L7,4 L0,4 z" Fill="{StaticResource AppointmentItemIndicatorFill}" Margin="2 4 2 2"
                          Height="4" Width="7" VerticalAlignment="Top" Stretch="Fill" HorizontalAlignment="Center" Visibility="{TemplateBinding StartIndicatorVisibility}" />
     
                            <StackPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Top" Margin="0 3 0 0">
                                <Image x:Name="RecurrenceMark" Grid.Column="0" Margin="2 1 1 0" Width="10" Height="10" Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsExeptionToVisibilityConverter}}" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Recurrence}" />
                                <Image x:Name="ExceptionMark" Grid.Column="0" Margin="2 1 1 0" Width="10" Height="10" Visibility="{Binding Path=RecurrenceState, Converter={StaticResource RecurrenceStateIsOccurenceToVisibilityConverter}}" HorizontalAlignment="Left" Source="{StaticResource AppointmentItem_Exception}" />
                            </StackPanel>
     
                            <ContentPresenter Grid.Column="2" Grid.Row="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
     
                            <Path Grid.ColumnSpan="3" Grid.Row="2" Data="M7,0 L3.5,4 L0,0 z" Height="4" Width="7" Stretch="Fill" Fill="{StaticResource AppointmentItemIndicatorFill}" Margin="2 2 2 4"
                          VerticalAlignment="Bottom" HorizontalAlignment="Center" Visibility="{TemplateBinding EndIndicatorVisibility}"/>
                        </Grid>
     
                        <Grid x:Name="MouseOverOverlay" Visibility="Collapsed" Opacity="0">
                            <Border x:Name="PART_StartResizeGrip" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Top" Cursor="SizeNS" dragDrop:RadDragAndDropManager.AllowDrag="True"
                            Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                                <StackPanel x:Name="StartResizeGrip" Margin="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                BorderThickness="0,0,1,1"
                                Width="3" Height="3" Margin="1" />
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                    BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                    BorderThickness="0,0,1,1"
                                    Width="3" Height="3" Margin="1" />
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                    BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                    BorderThickness="0,0,1,1"
                                    Width="3" Height="3" Margin="1" />
                                </StackPanel>
                            </Border>
                            <Border x:Name="PART_EndResizeGrip" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Cursor="SizeNS" dragDrop:RadDragAndDropManager.AllowDrag="True"
                            Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                                <StackPanel x:Name="EndResizeGrip" Margin="1" Orientation="Horizontal"  HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                    BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                    BorderThickness="0,0,1,1"
                                    Width="3" Height="3" Margin="1" />
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                    BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                    BorderThickness="0,0,1,1"
                                    Width="3" Height="3" Margin="1" />
                                    <Border Background="{StaticResource AppointmentItemResizeGripBackground}"
                                    BorderBrush="{StaticResource AppointmentItemResizeGripStroke}"
                                    BorderThickness="0,0,1,1"
                                    Width="3" Height="3" Margin="1" />
                                </StackPanel>
                            </Border>
                            <telerik:RadButton x:Name="DeleteButton" Width="11" Height="11" Margin="5 5 6 5" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top"
                                Command="local:RadScheduleViewCommands.DeleteAppointment" ClickMode="Press"  
                                CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                Visibility="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}}"
                                IsTabStop="False"
                                telerik:StyleManager.Theme="{StaticResource Theme}">
                                <Path Stroke="{StaticResource AppointmentItemDeleteIconStroke}" Data="M0,0 L5,5 M5,0 L0,5" />
                            </telerik:RadButton>
                        </Grid>
                    </Grid>
                </Grid>
     
     
            </ControlTemplate>
            <!--Telerik Template Ends-->
     
            <Style x:Key="SelectionOptionStyle" TargetType="Border">
                <Setter Property="Background" Value="{StaticResource SelectionOptionBackground}" />
                <Setter Property="BorderBrush" Value="{StaticResource SelectionOptionBorderBrush}" />
                <Setter Property="BorderThickness" Value="1 0 1 1" />
            </Style>
            <telerik:TimeRulerItemTemplateSelector x:Key="TimeRulerItemTemplateSelector">
                <telerik:TimeRulerItemTemplateSelector.HorizontalDayMajorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="2" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.HorizontalDayMajorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.HorizontalDayMinorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="2" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.HorizontalDayMinorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.HorizontalWeekMajorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="2" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.HorizontalWeekMajorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.HorizontalWeekMinorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="2" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.HorizontalWeekMinorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.VerticalDayMajorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.VerticalDayMajorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.VerticalDayMinorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.VerticalDayMinorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.VerticalWeekMajorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.VerticalWeekMajorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.VerticalWeekMinorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.VerticalWeekMinorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="2 1" TextAlignment="Left" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
                <telerik:TimeRulerItemTemplateSelector.HorizontalTimelineMajorItemTemplate>
                    <DataTemplate>
                        <!--
                        <TextBlock Text="{Binding FormattedValue}" Margin="2" TextAlignment="Left" />
                        -->
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.HorizontalTimelineMajorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.HorizontalTimelineMinorItemTemplate>
                    <DataTemplate>
                        <!--
                        <TextBlock Text="{Binding FormattedValue}" Margin="2" TextAlignment="Left" />
                        -->
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.HorizontalTimelineMinorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.VerticalTimelineGroupTemplate>
                    <DataTemplate>
                        <telerikPrimitives:LayoutTransformControl VerticalAlignment="Top">
                            <telerikPrimitives:LayoutTransformControl.LayoutTransform>
                                <RotateTransform Angle="-90" />
                            </telerikPrimitives:LayoutTransformControl.LayoutTransform>
                            <TextBlock Text="{Binding FormattedValue}" Margin="1 2" Height="16" TextAlignment="Right" />
                        </telerikPrimitives:LayoutTransformControl>
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.VerticalTimelineGroupTemplate>
                <telerik:TimeRulerItemTemplateSelector.VerticalTimelineMajorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.VerticalTimelineMajorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.VerticalTimelineMinorItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="0 2" MinWidth="54" TextAlignment="Right" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.VerticalTimelineMinorItemTemplate>
                <telerik:TimeRulerItemTemplateSelector.MonthGroupTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="6 2" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.MonthGroupTemplate>
                <telerik:TimeRulerItemTemplateSelector.MonthItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" Margin="6 2" />
                    </DataTemplate>
                </telerik:TimeRulerItemTemplateSelector.MonthItemTemplate>
            </telerik:TimeRulerItemTemplateSelector>
     
            <!--start styling saturdays sundays and weekdays background-->
            <Style x:Key="MouseOverHighlightStyle" TargetType="telerik:HighlightItem">
                <Setter Property="Opacity" Value="0.3"></Setter>
                <!--<Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Border Background="Transparent" >
     
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>-->
            </Style>
     
            <local:SpecialSlotStyleSelector x:Key="SpecialSlotStyleSelector">
                <local:SpecialSlotStyleSelector.SaturdayStyle>
                    <Style TargetType="telerik:HighlightItem">
                        <Setter Property="Background" Value="Silver" />
                    </Style>
                </local:SpecialSlotStyleSelector.SaturdayStyle>
                <local:SpecialSlotStyleSelector.SundayStyle>
                    <Style TargetType="telerik:HighlightItem">
                        <Setter Property="Background" Value="Silver" />
     
                    </Style>
                </local:SpecialSlotStyleSelector.SundayStyle>
                <local:SpecialSlotStyleSelector.WorkingHourStyle>
                    <Style TargetType="scheduleView:HighlightItem">
                        <Setter Property="Background" Value="Transparent" />
                        <Setter Property="VerticalAlignment" Value="Top" />
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="scheduleView:HighlightItem">
                                    <Grid Height="25" Width="Auto" ShowGridLines="False" Background="Silver">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <ProgressBar Width="Auto" Value="{Binding Slot.Effort}" Background="Black">
     
                                        </ProgressBar>
                                        <TextBlock Margin="4 2" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" Text="{Binding Slot.EffortHours}" FontWeight="Bold"/>
                                    </Grid>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </local:SpecialSlotStyleSelector.WorkingHourStyle>
                <local:SpecialSlotStyleSelector.HolidayHourStyle>
                    <Style TargetType="telerik:HighlightItem">
                        <Setter Property="Background" Value="Gray"></Setter>
                    </Style>
                </local:SpecialSlotStyleSelector.HolidayHourStyle>
            </local:SpecialSlotStyleSelector>
            <!--end styling saturday sunday and weekdays-->
     
            <!--Appointment Data template and Style Selector Starts-->
            <DataTemplate x:Key="AppointmentItemTemplate" telerik:StyleManager.Theme="{StaticResource Theme}">
                <Grid VerticalAlignment="Top" ShowGridLines="False">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <!--<RowDefinition Height="Auto"></RowDefinition>-->
                    </Grid.RowDefinitions>
                    <Image Source="images/time.png" Grid.Row="0"  Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0 0 16 0" Height="16" Width="16" Visibility="{Binding Path=Appointment.IsTimeBooking, Converter={StaticResource BooleanToVisibilityConverter}}"></Image>
                    <Image Source="{Binding Appointment.StatusImageUrl}" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Right" Height="16" Width="16"></Image>
                    <TextBlock Margin="2" TextWrapping="Wrap" Text="{Binding Appointment.Row1}" TextTrimming="WordEllipsis" Grid.Column="0" Grid.Row="0"/>
                    <TextBlock Margin="2" TextWrapping="Wrap" Text="{Binding Appointment.Row2}" TextTrimming="WordEllipsis" Grid.Column="0" Grid.Row="1"/>
                    <TextBlock Margin="2" TextWrapping="Wrap" Text="{Binding Appointment.Row3}" TextTrimming="WordEllipsis" Grid.Column="0" Grid.Row="2" Visibility="Collapsed"/>
                    <TextBlock Margin="2 0 0 0" TextWrapping="Wrap" FontWeight="Bold" Text="{Binding Appointment.BookingStatusName}" TextTrimming="WordEllipsis" Grid.Column="0" Grid.Row="3" Visibility="Collapsed"/>
                    <TextBlock Margin="12 0 0 0" TextWrapping="Wrap" Text="{Binding Appointment.Row4}" TextTrimming="WordEllipsis" Grid.Column="0" Grid.Row="3" Visibility="Collapsed"/>
     
                </Grid>
            </DataTemplate >
            <Style x:Key="AppointmentItemBaseStyle" TargetType="scheduleView:AppointmentItem">
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="BorderBrush" Value="Black"/>
                <Setter Property="ContentTemplate" Value="{StaticResource AppointmentItemTemplate}"/>
                <Setter Property="VerticalAlignment" Value="Top"></Setter>
                <Setter Property="Template" Value="{StaticResource AppointmentItemHorizontalControlTemplate}" />
                <!--<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                <Setter Property="VerticalContentAlignment" Value="Stretch"/>-->
                <!--<Setter Property="Padding" Value="2 0 0 0"/>
                <Setter Property="Margin" Value="0 1 0 0"></Setter>-->
                <!--<Setter Property="Template" Value="{StaticResource AppointmentItemHorizontalControlTemplate}"/>-->
                <!--<Setter Property="Background">
                    <Setter.Value>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <LinearGradientBrush.GradientStops>
                                <GradientStopCollection>
                                    <GradientStop Color="FloralWhite" Offset="0.0"/>
                                    <GradientStop Color="Transparent" Offset="1.0"/>
                                </GradientStopCollection>
                            </LinearGradientBrush.GradientStops>
                        </LinearGradientBrush>
                    </Setter.Value>
                </Setter>-->
                <!--<Setter Property="Height" Value="120"></Setter>-->
     
            </Style>
            <local:AppointmentStyleSelector x:Key="AppointmentItemStyleSelector">
                <local:AppointmentStyleSelector.CustomeAppointmentStyle>
                    <Style BasedOn="{StaticResource AppointmentItemBaseStyle}" TargetType="telerik:AppointmentItem">
                        <Setter Property="VerticalAlignment" Value="Top"/>
                    </Style>
                </local:AppointmentStyleSelector.CustomeAppointmentStyle>
            </local:AppointmentStyleSelector >
            <!--Appointment Data template and Style Selector Ends-->
     
            <!--Group Header Style Selector Starts-->
            <scheduleView:OrientedGroupHeaderStyleSelector x:Key="GroupHeaderStyle">
                <scheduleView:OrientedGroupHeaderStyleSelector.VerticalStyle>
                    <Style TargetType="telerik:GroupHeader">
                        <Setter Property="Padding" Value="0 25 0 25"></Setter>
                        <!--<Setter Property="MinHeight" Value="200"></Setter>
                        <Setter Property="MaxHeight" Value="Auto"></Setter>
                        <Setter Property="Height" Value="Auto"></Setter>-->
                    </Style>
                </scheduleView:OrientedGroupHeaderStyleSelector.VerticalStyle>
            </scheduleView:OrientedGroupHeaderStyleSelector>
     
            <local:OrientedGroupHeaderContentTemplateSelector x:Key="GroupHeaderTemplateSelector" >
                <local:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
                    <DataTemplate>
                        <Grid VerticalAlignment="Top" HorizontalAlignment="Stretch" Width="110" Height="Auto">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="Auto"></RowDefinition>
                            </Grid.RowDefinitions>
                            <TextBlock Margin="8,2" TextWrapping="Wrap"  Width="100" Text="{Binding Name}" TextTrimming="WordEllipsis" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
                        </Grid>
                    </DataTemplate>
                </local:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
            </local:OrientedGroupHeaderContentTemplateSelector>
            <!--Group Header Style Selector Ends-->
     
            <Style x:Key="DragDropHighlightStyle" TargetType="schedulView:HighlightItem">
                <Setter Property="Background" Value="{StaticResource DecorationRectangleBackground_DragOver}"/>
                <Setter Property="BorderBrush" Value="{StaticResource DecorationRectangleOuterBorder_DragOver}"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                <Grid>
                                    <Border BorderBrush="{StaticResource DecorationRectangleInnerBorder_DragOver}" BorderThickness="1"/>
     
     
                                    <TextBlock x:Name="StartTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Left" VerticalAlignment="Top" />
     
     
                                    <TextBlock x:Name="EndTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
                                </Grid>
                                </Border>
                        </ControlTemplate>
                    </Setter.Value>
                    </Setter>
                    </Style>
     
        </UserControl.Resources>
        <!--Declaration of resources ends here-->
        <!--ScheduleView Body Starts-->
        <Grid x:Name="scheduleViewBody">
            <Grid.RowDefinitions>
                <RowDefinition Height="32" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
     
            <Border Background="{StaticResource MainBackground}" Grid.ColumnSpan="2">
                <TextBlock x:Name="SchedulerHeader" Text="Demos Group Resource Schedule View"  FontFamily="Segoe UI"
                        HorizontalAlignment="Left" Foreground="#FFE5E2E2" Margin="13 0 0 0" FontSize="16" TextWrapping="Wrap"
                        VerticalAlignment="Center" />
            </Border>
     
            <!--Resource Template and Style Selectoe. This piece code is not used.-->
            <StackPanel Grid.Row="1" Grid.RowSpan="2" Orientation="Vertical" Visibility="Collapsed">
                <Border Background="{StaticResource SubHeadingBackground}" Height="32">
                    <TextBlock Text="Select Resources" TextWrapping="Wrap" FontSize="13" Foreground="#FFEBE9E9"
                            FontFamily="Segoe UI" VerticalAlignment="Center" Margin="13 0 0 0" />
                </Border>
                <Border Background="{StaticResource MainBackground}" Height="32">
                </Border>
                <ScrollViewer x:Name="svResources" Height="700" >
     
                </ScrollViewer>
            </StackPanel>
            <!--Resource Template and Style Selectoe. This piece code is not used.-->
     
            <telerik:RadBusyIndicator x:Name="busyIndicator" Grid.Row="1" Grid.Column="1" IsBusy="{Binding IsTaskRunning}" BusyContent="Loading data...." telerik:StyleManager.Theme="{StaticResource Theme}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="16"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <!--<ColumnDefinition Width="225" />-->
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <scheduleView:RadScheduleView
                Grid.Column="0"
                Grid.Row="0"
                ActiveViewDefinitionIndex="1"
                x:Name="RadView"
                        GroupHeaderStyleSelector="{StaticResource GroupHeaderStyle}"
                        GroupHeaderContentTemplateSelector="{StaticResource GroupHeaderTemplateSelector}"
                AppointmentsSource="{Binding Bookings,Mode=TwoWay}"
                SpecialSlotStyleSelector="{StaticResource SpecialSlotStyleSelector}"
                TimeRulerItemTemplateSelector="{StaticResource TimeRulerItemTemplateSelector}"
                GroupDescriptionsSource="{Binding GroupDescriptions}"
                ResourceTypesSource="{Binding ResourceTypes}"
                AppointmentCreating="RadView_AppointmentCreating"
                AppointmentEditing="RadView_AppointmentEditing"
                AppointmentEdited="RadView_AppointmentEdited"
                AppointmentDeleted="RadView_AppointmentDeleted"
                SpecialSlotsSource="{Binding SpecialSlots}"
                ShowDialog="RadView_ShowDialog"                   
                MouseOverHighlightStyle ="{StaticResource MouseOverHighlightStyle}"
                AppointmentStyleSelector="{StaticResource AppointmentItemStyleSelector}"                   
                VisibleRangeChangedCommand="{Binding VisibleRangeChangedCommand}"
                VisibleRangeChangedCommandParameter="{Binding VisibleRange, RelativeSource={RelativeSource Self}}"           
                MinAppointmentHeight="{Binding BookingHeight}"
                        VerticalOffset="{Binding ScrollPosition,Mode=TwoWay}"
                AppointmentCreated="RadView_AppointmentCreated" telerik:StyleManager.Theme="{StaticResource Theme}">
                        <scheduleView:RadScheduleView.ViewDefinitions>
                            <scheduleView:TimelineViewDefinition GroupFilter="{Binding GroupFilter}" Title="Day" VisibleDays="7" />
                        </scheduleView:RadScheduleView.ViewDefinitions>
                    </scheduleView:RadScheduleView>
     
                    <telerik:RadWrapPanel  HorizontalAlignment="Stretch" x:Name="searchPanelHeader" Grid.Row="1" Height="20" Background="Silver" Grid.Column="0" Margin="0,0,0,0" Orientation="Horizontal" VerticalAlignment="Stretch" telerik:StyleManager.Theme="{StaticResource Theme}">
                        <TextBlock HorizontalAlignment="Left" Text="Search Definitions" Margin="3 0 3 0" Foreground="Black"></TextBlock>
                    </telerik:RadWrapPanel>
     
                    <telerik:RadWrapPanel x:Name="WindowControlsPanel" HorizontalAlignment="Right" Grid.Row="1" Height="Auto" Background="Silver" Grid.Column="0" Margin="0,0,5,0" Orientation="Horizontal" VerticalAlignment="Stretch" telerik:StyleManager.Theme="{StaticResource Theme}">
                        <Button x:Name="MinimizeButton" Width="16" Height="16" Margin="0,0,1,0" Click="MinimizeButton_Click" Style="{StaticResource TopButtonStyle}" ToolTipService.ToolTip="Minimize" Padding="0">
                            <Path Data="F1M229.417,216.229L208.354,237.292C207.544,238.103,207.544,239.416,208.354,240.227C209.165,241.037,210.479,241.037,211.289,240.227L232.352,219.165C233.162,218.354,233.162,217.04,232.352,216.229C231.541,215.419,230.227,215.419,229.417,216.229" Fill="White" Stretch="Fill" UseLayoutRounding="False" RenderTransformOrigin="0.5,0.5" Height="6" Width="6" Margin="0,6,0,0">
                                <Path.RenderTransform>
                                    <CompositeTransform Rotation="45"/>
                                </Path.RenderTransform>
                            </Path>
                        </Button>
                        <Button x:Name="MaximizeButton" Visibility="Collapsed" Width="16" Height="16" Margin="0,0,1,0" Click="MaximizeButton_Click" Style="{StaticResource TopButtonStyle}" ToolTipService.ToolTip="Maximize">
                            <Path Data="F1M74.313,328.7861C74.313,329.5261,73.713,330.1281,72.973,330.1281L53.033,330.1281C52.292,330.1281,51.692,329.5261,51.692,328.7861L51.692,308.4751C51.692,307.7351,52.292,307.1361,53.033,307.1361L72.973,307.1361C73.713,307.1361,74.313,307.7351,74.313,308.4751z M74.806,305.0221L51.199,305.0221C50.323,305.0221,49.612,305.7311,49.612,306.6081L49.612,330.6551C49.612,331.5321,50.323,332.2411,51.199,332.2411L74.806,332.2411C75.683,332.2411,76.393,331.5321,76.393,330.6551L76.393,306.6081C76.393,305.7311,75.683,305.0221,74.806,305.0221" Fill="White" Stretch="Fill" UseLayoutRounding="False"/>
                        </Button>
                    </telerik:RadWrapPanel>
     
                    <ScrollViewer HorizontalAlignment="Stretch" Background="White" x:Name="svTabControl" Grid.Row="3" Grid.Column="0" Height="230" Width="Auto" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Auto" telerik:StyleManager.Theme="{StaticResource Theme}"  >
                        <tab:SearchTabControl x:Name="stc" >
                        </tab:SearchTabControl>
                    </ScrollViewer>
                </Grid>
            </telerik:RadBusyIndicator>
     
            <Canvas x:Name="Mask" Background="Gray" Opacity=".7" Visibility="Collapsed"/>
            <Popup x:Name="bookingPopUp" IsOpen="False" telerik:StyleManager.Theme="{StaticResource Theme}" >
            </Popup>
        </Grid>
        <!--ScheduleView Body Ends-->
    </UserControl>


    Thanks
    Alapan Sur

  5. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 07 Nov 2011 Link to this post

    Hi Alapan,

    I suggest you change the code below:
            <Style x:Key="DragDropHighlightStyle" TargetType="schedulView:HighlightItem">
    like this:
            <Style x:Key="DragDropHighlightStyle" TargetType="scheduleView:HighlightItem">

    This should solve the issue.

    Kind regards,
    Rosi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top