Intersoft ClientUI Documentation
How-to: Customize the Event Appearance using StyleSelector

This example shows how to customize the event appearance in UXScheduleView using ItemContainerStyleSelector.

Example

Description

UXScheduleDayView, UXScheduleWeekView, UXScheduleWorkWeekView, and UXScheduleMonthView share common ways to customize the event appearance. You need to provide the ViewItemStyle and ViewListStyle in each view to customize the event style.

The following code shows how to customize the event appearances in UXScheduleView that uses all view such as UXScheduleDayView, UXScheduleWeekView, UXScheduleWorkWeekView, and UXScheduleMonthView.

Code

XAML
Copy Code
<Intersoft:UXPage.Resources>
    <!-- Event Style Selector -->
    <Style x:Key="InlineEditingStyle" TargetType="Intersoft:UXTextBox">
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="2,4"/>
    </Style>
    <SolidColorBrush x:Key="EventOpacityMask" Color="#BF000000"/>
    <Style x:Key="UXThumbEmptyStyle" TargetType="Intersoft:UXThumb">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Height" Value="4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Intersoft:UXThumb">
                    <Grid x:Name="RootElement" Background="Transparent"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DayEventStyle" TargetType="Intersoft:UXScheduleViewEvent">
        <Setter Property="Background" Value="#FFFFFFFF"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="4,4,0,0"/>
        <Setter Property="InlineEditingTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Intersoft:UXTextBox HorizontalAlignment="Stretch" Padding="2,4" Style="{StaticResource InlineEditingStyle}" TextWrapping="Wrap" Text="{Binding Subject, Mode=TwoWay}" VerticalAlignment="Stretch"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock TextWrapping="Wrap" Text="{Binding Subject}" TextTrimming="WordEllipsis"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Intersoft:UXScheduleViewEvent">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedBorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedNotResizeable">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorderElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" To="White"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="Categoriestates">
                                <VisualState x:Name="NoCategory"/>
                                <VisualState x:Name="HasCategory">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CategoryList">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="NonEditing"/>
                                <VisualState x:Name="InlineEditing">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ContentElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditingElementContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EventStates">
                                <VisualState x:Name="Event"/>
                                <VisualState x:Name="RecurringEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RecurringElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExceptionEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ExceptionElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ResizerStates">
                                <VisualState x:Name="ShowBothResizer"/>
                                <VisualState x:Name="ShowPreviousResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BottomResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNextResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TopResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNoResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TopResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BottomResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" OpacityMask="{StaticResource EventOpacityMask}"/>
                        <Intersoft:DockPanel FillChildMode="Custom">
                            <Intersoft:UXScheduleViewCategoriesList x:Name="CategoryList" Intersoft:DockPanel.Dock="Left" Margin="6,6,0,0" Visibility="Collapsed" VerticalAlignment="Top">
                                <Intersoft:UXScheduleViewCategoriesListItem Background="{TemplateBinding CategoryBrush}"/>
                            </Intersoft:UXScheduleViewCategoriesList>
                            <Intersoft:DockPanel FillChildMode="Custom" Intersoft:DockPanel.IsFillElement="True">
                                <Grid Intersoft:DockPanel.IsFillElement="True">
                                    <ContentPresenter x:Name="ContentElement" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" VerticalAlignment="Top"/>
                                    <Grid x:Name="EditingElementContainer" Visibility="Collapsed"/>
                                </Grid>
                                <Image x:Name="RecurringElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/recurring.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Bottom"/>
                                <Image x:Name="ExceptionElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/exception.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Bottom"/>
                            </Intersoft:DockPanel>
                        </Intersoft:DockPanel>
                        <Border x:Name="BorderElement" BorderBrush="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="SelectedBorderElement" BorderBrush="Black" BorderThickness="2" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed"/>
                        <Grid x:Name="SelectedIndicator" Visibility="Collapsed">
                            <Rectangle x:Name="TopResizeIndicator" Fill="White" HorizontalAlignment="Center" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="6"/>
                            <Rectangle x:Name="BottomResizeIndicator" Fill="White" HorizontalAlignment="Center" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Bottom" Width="6"/>
                        </Grid>
                        <Intersoft:UXThumb x:Name="TopResize" Cursor="SizeNS" Style="{StaticResource UXThumbEmptyStyle}" VerticalAlignment="Top"/>
                        <Intersoft:UXThumb x:Name="BottomResize" Cursor="SizeNS" Style="{StaticResource UXThumbEmptyStyle}" VerticalAlignment="Bottom"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="OpenSwimEventStyle" TargetType="Intersoft:UXScheduleViewEvent" BasedOn="{StaticResource DayEventStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Intersoft:UXScheduleViewEvent">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedBorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedNotResizeable">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorderElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" To="White"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="Categoriestates">
                                <VisualState x:Name="NoCategory"/>
                                <VisualState x:Name="HasCategory">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CategoryList">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="NonEditing"/>
                                <VisualState x:Name="InlineEditing">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ContentElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditingElementContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EventStates">
                                <VisualState x:Name="Event"/>
                                <VisualState x:Name="RecurringEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RecurringElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExceptionEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ExceptionElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ResizerStates">
                                <VisualState x:Name="ShowBothResizer"/>
                                <VisualState x:Name="ShowPreviousResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BottomResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNextResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TopResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNoResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TopResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BottomResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" OpacityMask="{StaticResource EventOpacityMask}"/>
                        <Intersoft:DockPanel FillChildMode="Custom">
                            <Intersoft:UXScheduleViewCategoriesList x:Name="CategoryList" Intersoft:DockPanel.Dock="Left" Margin="6,6,0,0" Visibility="Collapsed" VerticalAlignment="Top">
                                <Intersoft:UXScheduleViewCategoriesListItem Background="{TemplateBinding CategoryBrush}"/>
                            </Intersoft:UXScheduleViewCategoriesList>
                            <Intersoft:DockPanel FillChildMode="Custom" Intersoft:DockPanel.IsFillElement="True">
                                <Grid Intersoft:DockPanel.IsFillElement="True">
                                    <ContentPresenter x:Name="ContentElement" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" VerticalAlignment="Top"/>
                                    <Grid x:Name="EditingElementContainer" Visibility="Collapsed"/>
                                </Grid>
                                <Image x:Name="RecurringElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/recurring.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Bottom"/>
                                <Image x:Name="ExceptionElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/exception.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Bottom"/>
                            </Intersoft:DockPanel>
                        </Intersoft:DockPanel>
                        <Image x:Name="IconElement" Margin="4" Source="/UXScheduleView.Samples;component/Assets/Images/Pools/OpenSwim.png" VerticalAlignment="Bottom" HorizontalAlignment="Left" Stretch="Fill" Height="27" Width="27"/>
                        <Border x:Name="BorderElement" BorderBrush="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="SelectedBorderElement" BorderBrush="Black" BorderThickness="2" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed"/>
                        <Grid x:Name="SelectedIndicator" Visibility="Collapsed">
                            <Rectangle x:Name="TopResizeIndicator" Fill="White" HorizontalAlignment="Center" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="6"/>
                            <Rectangle x:Name="BottomResizeIndicator" Fill="White" HorizontalAlignment="Center" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Bottom" Width="6"/>
                        </Grid>
                        <Intersoft:UXThumb x:Name="TopResize" Cursor="SizeNS" Style="{StaticResource UXThumbEmptyStyle}" VerticalAlignment="Top"/>
                        <Intersoft:UXThumb x:Name="BottomResize" Cursor="SizeNS" Style="{StaticResource UXThumbEmptyStyle}" VerticalAlignment="Bottom"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PoolEventStyle" TargetType="Intersoft:UXScheduleViewEvent" BasedOn="{StaticResource DayEventStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Intersoft:UXScheduleViewEvent">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedBorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedNotResizeable">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorderElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" To="White"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="Categoriestates">
                                <VisualState x:Name="NoCategory"/>
                                <VisualState x:Name="HasCategory">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CategoryList">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="NonEditing"/>
                                <VisualState x:Name="InlineEditing">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ContentElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditingElementContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EventStates">
                                <VisualState x:Name="Event"/>
                                <VisualState x:Name="RecurringEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RecurringElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExceptionEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ExceptionElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ResizerStates">
                                <VisualState x:Name="ShowBothResizer"/>
                                <VisualState x:Name="ShowPreviousResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BottomResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNextResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TopResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNoResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TopResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BottomResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" OpacityMask="{StaticResource EventOpacityMask}"/>
                        <Intersoft:DockPanel FillChildMode="Custom">
                            <Intersoft:UXScheduleViewCategoriesList x:Name="CategoryList" Intersoft:DockPanel.Dock="Left" Margin="6,6,0,0" Visibility="Collapsed" VerticalAlignment="Top">
                                <Intersoft:UXScheduleViewCategoriesListItem Background="{TemplateBinding CategoryBrush}"/>
                            </Intersoft:UXScheduleViewCategoriesList>
                            <Intersoft:DockPanel FillChildMode="Custom" Intersoft:DockPanel.IsFillElement="True">
                                <Grid Intersoft:DockPanel.IsFillElement="True">
                                    <ContentPresenter x:Name="ContentElement" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" VerticalAlignment="Top"/>
                                    <Grid x:Name="EditingElementContainer" Visibility="Collapsed"/>
                                </Grid>
                                <Image x:Name="RecurringElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/recurring.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Bottom"/>
                                <Image x:Name="ExceptionElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/exception.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Bottom"/>
                            </Intersoft:DockPanel>
                        </Intersoft:DockPanel>
                        <Image x:Name="IconElement" Margin="4" Source="/UXScheduleView.Samples;component/Assets/Images/Pools/PoolEvent.png" VerticalAlignment="Bottom" HorizontalAlignment="Left" Stretch="Fill" Height="27" Width="27"/>
                        <Border x:Name="BorderElement" BorderBrush="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="SelectedBorderElement" BorderBrush="Black" BorderThickness="2" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed"/>
                        <Grid x:Name="SelectedIndicator" Visibility="Collapsed">
                            <Rectangle x:Name="TopResizeIndicator" Fill="White" HorizontalAlignment="Center" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="6"/>
                            <Rectangle x:Name="BottomResizeIndicator" Fill="White" HorizontalAlignment="Center" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Bottom" Width="6"/>
                        </Grid>
                        <Intersoft:UXThumb x:Name="TopResize" Cursor="SizeNS" Style="{StaticResource UXThumbEmptyStyle}" VerticalAlignment="Top"/>
                        <Intersoft:UXThumb x:Name="BottomResize" Cursor="SizeNS" Style="{StaticResource UXThumbEmptyStyle}" VerticalAlignment="Bottom"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="SwimmingLessonEventStyle" TargetType="Intersoft:UXScheduleViewEvent" BasedOn="{StaticResource DayEventStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Intersoft:UXScheduleViewEvent">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedBorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedNotResizeable">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorderElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" To="White"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="Categoriestates">
                                <VisualState x:Name="NoCategory"/>
                                <VisualState x:Name="HasCategory">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CategoryList">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="NonEditing"/>
                                <VisualState x:Name="InlineEditing">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ContentElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditingElementContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EventStates">
                                <VisualState x:Name="Event"/>
                                <VisualState x:Name="RecurringEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RecurringElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExceptionEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ExceptionElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ResizerStates">
                                <VisualState x:Name="ShowBothResizer"/>
                                <VisualState x:Name="ShowPreviousResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BottomResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNextResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TopResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNoResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TopResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BottomResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" OpacityMask="{StaticResource EventOpacityMask}"/>
                        <Intersoft:DockPanel FillChildMode="Custom">
                            <Intersoft:UXScheduleViewCategoriesList x:Name="CategoryList" Intersoft:DockPanel.Dock="Left" Margin="6,6,0,0" Visibility="Collapsed" VerticalAlignment="Top">
                                <Intersoft:UXScheduleViewCategoriesListItem Background="{TemplateBinding CategoryBrush}"/>
                            </Intersoft:UXScheduleViewCategoriesList>
                            <Intersoft:DockPanel FillChildMode="Custom" Intersoft:DockPanel.IsFillElement="True">
                                <Grid Intersoft:DockPanel.IsFillElement="True">
                                    <ContentPresenter x:Name="ContentElement" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" VerticalAlignment="Top"/>
                                    <Grid x:Name="EditingElementContainer" Visibility="Collapsed"/>
                                </Grid>
                                <Image x:Name="RecurringElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/recurring.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Bottom"/>
                                <Image x:Name="ExceptionElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/exception.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Bottom"/>
                            </Intersoft:DockPanel>
                        </Intersoft:DockPanel>
                        <Image x:Name="IconElement" Margin="4" Source="/UXScheduleView.Samples;component/Assets/Images/Pools/SwimmingLesson.png" VerticalAlignment="Bottom" HorizontalAlignment="Left" Stretch="Fill" Height="27" Width="27"/>
                        <Border x:Name="BorderElement" BorderBrush="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="SelectedBorderElement" BorderBrush="Black" BorderThickness="2" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed"/>
                        <Grid x:Name="SelectedIndicator" Visibility="Collapsed">
                            <Rectangle x:Name="TopResizeIndicator" Fill="White" HorizontalAlignment="Center" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Width="6"/>
                            <Rectangle x:Name="BottomResizeIndicator" Fill="White" HorizontalAlignment="Center" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Bottom" Width="6"/>
                        </Grid>
                        <Intersoft:UXThumb x:Name="TopResize" Cursor="SizeNS" Style="{StaticResource UXThumbEmptyStyle}" VerticalAlignment="Top"/>
                        <Intersoft:UXThumb x:Name="BottomResize" Cursor="SizeNS" Style="{StaticResource UXThumbEmptyStyle}" VerticalAlignment="Bottom"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <SolidColorBrush x:Key="ArrowIndicatorColor" Color="#FF313131"/>
    <Style x:Key="UXThumbVerticalEmptyStyle" TargetType="Intersoft:UXThumb">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Width" Value="4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Intersoft:UXThumb">
                    <Grid x:Name="RootElement" Background="Transparent"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="AllDayEventStyle" BasedOn="{StaticResource DayEventStyle}" TargetType="Intersoft:UXScheduleViewEvent">
        <Setter Property="Padding" Value="4,0"/>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Text="{Binding Subject}" TextTrimming="WordEllipsis"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="InlineEditingTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Intersoft:UXTextBox HorizontalAlignment="Center" Style="{StaticResource InlineEditingStyle}" Text="{Binding Subject, Mode=TwoWay}" VerticalAlignment="Center"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Intersoft:UXScheduleViewEvent">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedBorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedNotResizeable">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorderElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RightResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" To="White"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="Categoriestates">
                                <VisualState x:Name="NoCategory"/>
                                <VisualState x:Name="HasCategory">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CategoryList">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="NonEditing"/>
                                <VisualState x:Name="InlineEditing">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ContentElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditingElementContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EventStates">
                                <VisualState x:Name="Event"/>
                                <VisualState x:Name="RecurringEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RecurringElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExceptionEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ExceptionElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="StartDateIndicatorStates">
                                <VisualState x:Name="NoStartDateIndicator"/>
                                <VisualState x:Name="ShowStartTime">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartTime">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowStartDate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartDate">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowStartDateYear">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartDateYear">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EndDateIndicatorStates">
                                <VisualState x:Name="NoEndDateIndicator"/>
                                <VisualState x:Name="ShowEndTime">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndTime">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowEndDate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndDate">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowEndDateYear">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndDateYear">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ResizerStates">
                                <VisualState x:Name="ShowBothResizer"/>
                                <VisualState x:Name="ShowPreviousResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RightResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNextResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LeftResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNoResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RightResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LeftResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" OpacityMask="{StaticResource EventOpacityMask}"/>
                        <Intersoft:DockPanel FillChildMode="Custom">
                            <Path x:Name="StartIndicator" Intersoft:DockPanel.Dock="Left" Data="M0,5 L6,0 L6,10 z" Fill="{StaticResource ArrowIndicatorColor}" Margin="4,0" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="StartDateYear" Intersoft:DockPanel.Dock="Left" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventStartDateYear}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="StartDate" Intersoft:DockPanel.Dock="Left" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventStartDate}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="StartTime" Intersoft:DockPanel.Dock="Left" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventStartTime}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <Intersoft:DockPanel FillChildMode="Custom" Intersoft:DockPanel.IsFillElement="True">
                                <Intersoft:DockPanel FillChildMode="Custom" HorizontalAlignment="Center" Intersoft:DockPanel.IsFillElement="True" VerticalAlignment="Center">
                                    <Intersoft:UXScheduleViewCategoriesList x:Name="CategoryList" Intersoft:DockPanel.Dock="Left" Margin="4,0,0,0" Visibility="Collapsed">
                                        <Intersoft:UXScheduleViewCategoriesListItem Background="{TemplateBinding CategoryBrush}"/>
                                    </Intersoft:UXScheduleViewCategoriesList>
                                    <Grid Intersoft:DockPanel.IsFillElement="True">
                                        <ContentPresenter x:Name="ContentElement" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"/>
                                        <Grid x:Name="EditingElementContainer" Visibility="Collapsed"/>
                                    </Grid>
                                </Intersoft:DockPanel>
                                <Image x:Name="RecurringElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/recurring.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Center"/>
                                <Image x:Name="ExceptionElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="2" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/exception.png" Stretch="Fill" Visibility="Collapsed" Height="16" Width="16" VerticalAlignment="Center"/>
                            </Intersoft:DockPanel>
                            <Path x:Name="EndIndicator" Intersoft:DockPanel.Dock="Right" Data="M0,0 L0,10 L5,5 z" Fill="{StaticResource ArrowIndicatorColor}" Margin="4,0" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="EndTime" Intersoft:DockPanel.Dock="Right" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventEndTime}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="EndDate" Intersoft:DockPanel.Dock="Right" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventEndDate}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="EndDateYear" Intersoft:DockPanel.Dock="Right" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventEndDateYear}" Visibility="Collapsed" VerticalAlignment="Center"/>
                        </Intersoft:DockPanel>
                        <Border x:Name="BorderElement" BorderBrush="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="SelectedBorderElement" BorderBrush="Black" BorderThickness="2" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed"/>
                        <Grid x:Name="SelectedIndicator" Visibility="Collapsed">
                            <Rectangle x:Name="LeftResizeIndicator" Fill="White" HorizontalAlignment="Left" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Center" Width="6"/>
                            <Rectangle x:Name="RightResizeIndicator" Fill="White" HorizontalAlignment="Right" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Center" Width="6"/>
                        </Grid>
                        <Intersoft:UXThumb x:Name="LeftResize" Cursor="SizeWE" HorizontalAlignment="Left" Style="{StaticResource UXThumbVerticalEmptyStyle}"/>
                        <Intersoft:UXThumb x:Name="RightResize" Cursor="SizeWE" HorizontalAlignment="Right" Style="{StaticResource UXThumbVerticalEmptyStyle}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Intersoft:EventAlignmentConverter x:Key="EventAlignmentConverter"/>
    <Style x:Key="MonthEventStyle" BasedOn="{StaticResource AllDayEventStyle}" TargetType="Intersoft:UXScheduleViewEvent">
        <Setter Property="InlineEditingTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Intersoft:UXTextBox HorizontalAlignment="Center" Style="{StaticResource InlineEditingStyle}" Text="{Binding Subject, Mode=TwoWay}" VerticalAlignment="Center"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Intersoft:UXScheduleViewEvent">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedBorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedNotResizeable">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorderElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RightResize" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" To="White"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="Categoriestates">
                                <VisualState x:Name="NoCategory"/>
                                <VisualState x:Name="HasCategory">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CategoryList">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="NonEditing"/>
                                <VisualState x:Name="InlineEditing">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ContentElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditingElementContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EventStates">
                                <VisualState x:Name="Event"/>
                                <VisualState x:Name="RecurringEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RecurringElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExceptionEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ExceptionElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="StartDateIndicatorStates">
                                <VisualState x:Name="NoStartDateIndicator"/>
                                <VisualState x:Name="ShowStartTime">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartTime">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowStartDate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartDate">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowStartDateYear">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="StartDateYear">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EndDateIndicatorStates">
                                <VisualState x:Name="NoEndDateIndicator"/>
                                <VisualState x:Name="ShowEndTime">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndTime">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowEndDate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndDate">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowEndDateYear">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EndDateYear">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ResizerStates">
                                <VisualState x:Name="ShowBothResizer"/>
                                <VisualState x:Name="ShowPreviousResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RightResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNextResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LeftResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ShowNoResizer">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RightResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LeftResizeIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="TimeStates">
                                <VisualState x:Name="NoTime"/>
                                <VisualState x:Name="ShowTime">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="TimeElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" OpacityMask="{StaticResource EventOpacityMask}"/>
                        <Intersoft:DockPanel FillChildMode="Custom">
                            <Path x:Name="StartIndicator" Intersoft:DockPanel.Dock="Left" Data="M0,5 L6,0 L6,10 z" Fill="{StaticResource ArrowIndicatorColor}" Margin="4,0" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="StartDateYear" Intersoft:DockPanel.Dock="Left" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventStartDateYear}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="StartDate" Intersoft:DockPanel.Dock="Left" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventStartDate}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="StartTime" Intersoft:DockPanel.Dock="Left" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventStartTime}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <Intersoft:DockPanel FillChildMode="Custom" Intersoft:DockPanel.IsFillElement="True">
                                <Intersoft:DockPanel FillChildMode="Custom" HorizontalAlignment="{Binding Visibility, Converter={StaticResource EventAlignmentConverter}, ElementName=TimeElement}" Intersoft:DockPanel.IsFillElement="True" VerticalAlignment="Center">
                                    <Intersoft:UXScheduleViewCategoriesList x:Name="CategoryList" Intersoft:DockPanel.Dock="Left" Margin="4,0,0,2" Visibility="Collapsed">
                                        <Intersoft:UXScheduleViewCategoriesListItem Background="{TemplateBinding CategoryBrush}"/>
                                    </Intersoft:UXScheduleViewCategoriesList>
                                    <Image x:Name="TimeElement" Intersoft:DockPanel.Dock="Left" Height="14" Margin="4,0,0,0" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/time.png" Visibility="Collapsed" VerticalAlignment="Center" Width="14">
                                        <ToolTipService.ToolTip>
                                            <StackPanel Intersoft:DockPanel.Dock="Left" Orientation="Horizontal" VerticalAlignment="Center">
                                                <TextBlock Text="{TemplateBinding StartTime}"/>
                                                <TextBlock Text=" – "/>
                                                <TextBlock Text="{TemplateBinding EndTime}"/>
                                            </StackPanel>
                                        </ToolTipService.ToolTip>
                                    </Image>
                                    <Grid Intersoft:DockPanel.IsFillElement="True">
                                        <ContentPresenter x:Name="ContentElement" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}" VerticalAlignment="Center"/>
                                        <Grid x:Name="EditingElementContainer" Visibility="Collapsed"/>
                                    </Grid>
                                </Intersoft:DockPanel>
                                <Image x:Name="RecurringElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="{TemplateBinding Padding}" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/recurring.png" Height="16" Width="16" Stretch="Fill" Visibility="Collapsed" VerticalAlignment="Center"/>
                                <Image x:Name="ExceptionElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="{TemplateBinding Padding}" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/exception.png" Height="16" Width="16" Stretch="Fill" Visibility="Collapsed" VerticalAlignment="Center"/>
                            </Intersoft:DockPanel>
                            <Path x:Name="EndIndicator" Intersoft:DockPanel.Dock="Right" Data="M0,0 L0,10 L5,5 z" Fill="{StaticResource ArrowIndicatorColor}" Margin="4,0" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="EndTime" Intersoft:DockPanel.Dock="Right" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventEndTime}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="EndDate" Intersoft:DockPanel.Dock="Right" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventEndDate}" Visibility="Collapsed" VerticalAlignment="Center"/>
                            <TextBlock x:Name="EndDateYear" Intersoft:DockPanel.Dock="Right" Foreground="{StaticResource ArrowIndicatorColor}" Margin="4,0" Text="{Binding EventEndDateYear}" Visibility="Collapsed" VerticalAlignment="Center"/>
                        </Intersoft:DockPanel>
                        <Border x:Name="BorderElement" BorderBrush="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="SelectedBorderElement" BorderBrush="Black" BorderThickness="2" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed"/>
                        <Grid x:Name="SelectedIndicator" Visibility="Collapsed">
                            <Rectangle x:Name="LeftResizeIndicator" Fill="White" HorizontalAlignment="Left" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Center" Width="6"/>
                            <Rectangle x:Name="RightResizeIndicator" Fill="White" HorizontalAlignment="Right" Height="6" Margin="-3" Stroke="Black" StrokeThickness="1" VerticalAlignment="Center" Width="6"/>
                        </Grid>
                        <Intersoft:UXThumb x:Name="LeftResize" Cursor="SizeWE" HorizontalAlignment="Left" Style="{StaticResource UXThumbVerticalEmptyStyle}"/>
                        <Intersoft:UXThumb x:Name="RightResize" Cursor="SizeWE" HorizontalAlignment="Right" Style="{StaticResource UXThumbVerticalEmptyStyle}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MoreEventStyle" BasedOn="{StaticResource MonthEventStyle}" TargetType="Intersoft:UXScheduleViewEvent">
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Text="{Binding Subject}" TextTrimming="WordEllipsis"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="InlineEditingTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Intersoft:UXTextBox Style="{StaticResource InlineEditingStyle}" Text="{Binding Subject, Mode=TwoWay}" VerticalAlignment="Center"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Intersoft:UXScheduleViewEvent">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedBorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(OpacityMask).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundElement"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="Categoriestates">
                                <VisualState x:Name="NoCategory"/>
                                <VisualState x:Name="HasCategory">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CategoryList">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="NonEditing"/>
                                <VisualState x:Name="InlineEditing">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ContentElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditingElementContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EventStates">
                                <VisualState x:Name="Event"/>
                                <VisualState x:Name="RecurringEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="RecurringElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExceptionEvent">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ExceptionElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" OpacityMask="{StaticResource EventOpacityMask}"/>
                        <Intersoft:DockPanel FillChildMode="Custom">
                            <Intersoft:UXScheduleViewCategoriesList x:Name="CategoryList" Intersoft:DockPanel.Dock="Left" Margin="4,0,0,0" Visibility="Collapsed">
                                <Intersoft:UXScheduleViewCategoriesListItem Background="{TemplateBinding CategoryBrush}"/>
                            </Intersoft:UXScheduleViewCategoriesList>
                            <Intersoft:DockPanel FillChildMode="Custom" Intersoft:DockPanel.IsFillElement="True">
                                <Grid Intersoft:DockPanel.IsFillElement="True">
                                    <ContentPresenter x:Name="ContentElement" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}" VerticalAlignment="Center"/>
                                    <Grid x:Name="EditingElementContainer" Visibility="Collapsed"/>
                                </Grid>
                                <Image x:Name="RecurringElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="{TemplateBinding Padding}" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/recurring.png" Height="16" Width="16" Stretch="Fill" Visibility="Collapsed" VerticalAlignment="Center"/>
                                <Image x:Name="ExceptionElement" Intersoft:DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="{TemplateBinding Padding}" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/exception.png" Height="16" Width="16" Stretch="Fill" Visibility="Collapsed" VerticalAlignment="Center"/>
                            </Intersoft:DockPanel>
                        </Intersoft:DockPanel>
                        <Border x:Name="BorderElement" BorderBrush="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="SelectedBorderElement" BorderBrush="Black" BorderThickness="2" CornerRadius="{TemplateBinding CornerRadius}" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <LinearGradientBrush x:Key="OpenSwimColor" EndPoint="0.5,0" StartPoint="0.5,1">
        <GradientStop Color="#FFA2DE6D" Offset="1"/>
        <GradientStop Color="#FF8CB068" Offset="0"/>

    </LinearGradientBrush>

    <LinearGradientBrush x:Key="PoolEventColor" EndPoint="0.5,0" StartPoint="0.5,1">
        <GradientStop Color="#FFAB986D" Offset="0"/>
        <GradientStop Color="#FFD8B86D" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="SwimmingLessonColor" EndPoint="0.5,0" StartPoint="0.5,1">
        <GradientStop Color="#FF3EBADC" Offset="1"/>
        <GradientStop Color="#FF1F8BA7" Offset="0"/>
    </LinearGradientBrush>

    <Selector:ScheduleViewEventStyleSelector x:Key="SchedulerEventStyleSelector" 
                                            AllDayEventStyle="{StaticResource AllDayEventStyle}" DayEventStyle="{StaticResource DayEventStyle}" MoreEventStyle="{StaticResource MoreEventStyle}" MonthEventStyle="{StaticResource MonthEventStyle}"
                                            OpenSwimEventStyle="{StaticResource OpenSwimEventStyle}" PoolEventStyle="{StaticResource PoolEventStyle}" SwimmingLessonEventStyle="{StaticResource SwimmingLessonEventStyle}"
                                            OpenSwimColor="{StaticResource OpenSwimColor}" PoolEventColor="{StaticResource PoolEventColor}" SwimmingLessonColor="{StaticResource SwimmingLessonColor}"/>

    <!-- ScheduleDayViewItem -->
    <Style x:Key="ScheduleDayViewItemStyle" TargetType="Intersoft:UXScheduleDayViewItem">
        <Setter Property="ItemContainerStyleSelector" Value="{StaticResource SchedulerEventStyleSelector}"/>
    </Style>

    <!-- ScheduleDayViewAllDayEventLayout -->
    <Style x:Key="ScheduleDayViewAllDayEventLayoutStyle" TargetType="Intersoft:UXScheduleDayViewAllDayEventLayout">
        <Setter Property="ItemContainerStyleSelector" Value="{StaticResource SchedulerEventStyleSelector}"/>
    </Style>

    <!-- ScheduleDayViewList -->
    <Style x:Key="ScheduleDayViewListStyle" TargetType="Intersoft:UXScheduleDayViewList">
        <Setter Property="AllDayEventLayoutStyle" Value="{StaticResource ScheduleDayViewAllDayEventLayoutStyle}"/>
    </Style>

    <!-- ScheduleDayView -->
    <Style x:Key="ScheduleDayViewStyle" TargetType="Intersoft:UXScheduleDayView">
        <Setter Property="ViewItemStyle" Value="{StaticResource ScheduleDayViewItemStyle}"/>
        <Setter Property="ViewListStyle" Value="{StaticResource ScheduleDayViewListStyle}"/>
    </Style>

    <!-- ScheduleMonthViewMoreItemsList -->
    <Style x:Key="ScheduleMonthViewMoreItemsListStyle" TargetType="Intersoft:UXScheduleMonthViewMoreItemsList">
        <Setter Property="ItemContainerStyleSelector" Value="{StaticResource SchedulerEventStyleSelector}"/>
    </Style>

    <!-- ScheduleMonthViewItem -->
    <Style x:Key="ScheduleMonthViewItemStyle" TargetType="Intersoft:UXScheduleMonthViewItem">
        <Setter Property="ItemContainerStyleSelector" Value="{StaticResource SchedulerEventStyleSelector}"/>
    </Style>

    <!-- ScheduleMonthView -->
    <Style x:Key="ScheduleMonthViewStyle" TargetType="Intersoft:UXScheduleMonthView">
        <Setter Property="ViewItemStyle" Value="{StaticResource ScheduleMonthViewItemStyle}"/>
        <Setter Property="MoreItemsStyle" Value="{StaticResource ScheduleMonthViewMoreItemsListStyle}"/>
    </Style>
</Intersoft:UXPage.Resources>

<Intersoft:UXScheduleView DisplayDate="1/2/2012"
                            EventsSource="{Binding Events}" CategoriesSource="{Binding Categories}" ResourcesSource="{Binding Resources}">
    <Intersoft:UXScheduleDayView Style="{StaticResource ScheduleDayViewStyle}"/>
    <Intersoft:UXScheduleWorkWeekView Style="{StaticResource ScheduleDayViewStyle}"/>
    <Intersoft:UXScheduleWeekView IsActive="True" Style="{StaticResource ScheduleDayViewStyle}"/>
    <Intersoft:UXScheduleMonthView Style="{StaticResource ScheduleMonthViewStyle}"/>
</Intersoft:UXScheduleView>

 

See Also

Concepts