	  
	   
    
		

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="clr-namespace:C1.WPF" xmlns:s="clr-namespace:System;assembly=mscorlib">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/C1.WPF.4;component/themes/Common.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Color x:Key="RadialMenuAccentColor">#FF8E1AB0</Color>
    <SolidColorBrush x:Key="RadialMenuAccentBrush" Color="#FF8E1AB0" />
    <SolidColorBrush x:Key="RadialMenuForegroundBrush" Color="{StaticResource ForegroundColor}" />
    <SolidColorBrush x:Key="RadialMenuBorderBrush" Color="#FFEEDDEC" />
    <SolidColorBrush x:Key="RadialMenuExpandButtonForegroundBrush" Color="White" />
    <SolidColorBrush x:Key="RadialMenuBackgroundBrush" Color="White" />
    <Color x:Key="RadialMenuButtonOverColor">#FF8E1AB0</Color>
    <Color x:Key="RadialMenuNavigationButtonOverColor">#FFB0B0B0</Color>
    <SolidColorBrush x:Key="RadialMenuExpandButtonBackgroundBrush" Color="#FF8E1AB0" />
    <SolidColorBrush x:Key="RadialMenuExpandButtonOverBackgroundBrush" Color="#FF650880" />
    <Color x:Key="RadialMenuDisabledColor">Gray</Color>


    <!--****************** C1RadialMenu ********************-->

    <c1:AngleConverter x:Key="AngleConverter" />

    <c1:DoubleToThicknessConverter x:Key="DoubleToThicknessConverter" />

    <c1:ExpandButtonTagConverter x:Key="ExpandButtonTagConverter" />

    <Style x:Key="ExpandButtonStyle" TargetType="Button">
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverElement" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Path x:Name="Background" Stroke="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" StrokeThickness="{Binding Tag, RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ExpandButtonTagConverter}}">
                            <Path.Data>
                                <PathGeometry>
                                    <PathFigure IsFilled="False" IsClosed="False" StartPoint="{Binding StartPoint}">
                                        <ArcSegment Point="{Binding EndPoint}" Size="{Binding Size}" SweepDirection="Clockwise" />
                                    </PathFigure>
                                </PathGeometry>
                            </Path.Data>
                        </Path>
                        <Path x:Name="MouseOverElement" Stroke="{Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed" StrokeThickness="{Binding Tag, RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ExpandButtonTagConverter}}">
                            <Path.Data>
                                <PathGeometry>
                                    <PathFigure IsFilled="False" IsClosed="False" StartPoint="{Binding StartPoint}">
                                        <ArcSegment Point="{Binding EndPoint}" Size="{Binding Size}" SweepDirection="Clockwise" />
                                    </PathFigure>
                                </PathGeometry>
                            </Path.Data>
                        </Path>
                        <Polygon x:Name="ExpandIcon" Height="12" Width="7" Stretch="Fill" Margin="8" Fill="{StaticResource RadialMenuExpandButtonForegroundBrush}" HorizontalAlignment="Right" VerticalAlignment="Center" Points="100,200 150,100 100,0 100,200" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1RadialMenuItem Style -->
    <Style TargetType="c1:C1RadialMenuItem" x:Key="RadialMenuItemStyle">
        <Setter Property="Padding" Value="10,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1RadialMenuItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="IconPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="{StaticResource RadialMenuDisabledColor}" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="HeaderPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="{StaticResource RadialMenuDisabledColor}" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="HighlightedElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="{StaticResource RadialMenuDisabledColor}" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="CheckElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="{StaticResource RadialMenuDisabledColor}" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HighlightedStates">
                                <VisualState x:Name="NonHighlighted" />
                                <VisualState x:Name="Highlighted">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HighlightedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="HeaderPanel">
                            <Grid.Resources>
                                <Storyboard x:Key="EnterStoryboard">
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" FillBehavior="HoldEnd" Storyboard.TargetName="HeaderPresenter">
                                        <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0" />
                                        <EasingDoubleKeyFrame KeyTime="0:0:00.5" Value="1" />
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </Grid.Resources>
                            <!-- the next transparent sector is required for correct handling pointer events-->
                            <c1:C1BrushBuilder x:Name="ButtonBackground" Input="{TemplateBinding AccentBrush}" DesignBrush="{StaticResource RadialMenuExpandButtonBackgroundBrush}" DesignColor="{StaticResource RadialMenuAccentColor}" />
                            <c1:C1BrushBuilder x:Name="ButtonPointerOverBrush" Input="{TemplateBinding AccentBrush}" DesignBrush="{StaticResource RadialMenuExpandButtonOverBackgroundBrush}" DesignColor="{StaticResource RadialMenuButtonOverColor}" />
                            <Path Fill="Transparent" DataContext="{Binding OuterArc, RelativeSource={RelativeSource TemplatedParent}}">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathFigure StartPoint="{Binding CenterPoint, RelativeSource={RelativeSource TemplatedParent}}" IsFilled="True" IsClosed="True">
                                            <PathFigure.Segments>
                                                <LineSegment Point="{Binding StartPoint}" />
                                                <ArcSegment Point="{Binding EndPoint}" SweepDirection="Clockwise" Size="{Binding Size}" />
                                                <LineSegment Point="{Binding CenterPoint, RelativeSource={RelativeSource TemplatedParent}}" />
                                            </PathFigure.Segments>
                                        </PathFigure>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                            <!-- for the next StackPanel set Horizontal and VerticalAlignment to center and don't set Background.
                                 So it would occupy as little space as possible and don't expand on the nearby items. 
                                 In other case we'll have to clip it to bounds, it might be tricky -->
                            <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" RenderTransformOrigin="0.5,0.5">
                                <StackPanel.RenderTransform>
                                    <RotateTransform Angle="{Binding Angle, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource AngleConverter}, ConverterParameter=-1}" />
                                </StackPanel.RenderTransform>
                                <ContentControl x:Name="IconPresenter" HorizontalAlignment="Center" Foreground="{TemplateBinding HeaderForeground}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                                </ContentControl>
                                <ContentControl x:Name="HeaderPresenter" HorizontalAlignment="Center" Margin="0,9,0,0" Foreground="{TemplateBinding HeaderForeground}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                                </ContentControl>
                            </StackPanel>                            
                            <Path x:Name="CheckElement" Fill="Violet" StrokeThickness="1" Stroke="{TemplateBinding AccentBrush}" DataContext="{Binding CheckArc, RelativeSource={RelativeSource TemplatedParent}}">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathFigure IsFilled="False" IsClosed="False" StartPoint="{Binding StartPoint}">
                                            <ArcSegment Point="{Binding EndPoint}" Size="{Binding Size}" SweepDirection="Clockwise" />
                                        </PathFigure>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                            <Path Stroke="{TemplateBinding AccentBrush}" x:Name="HighlightedElement" DataContext="{Binding CheckArc, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed" StrokeThickness="2">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathFigure IsFilled="False" IsClosed="False" StartPoint="{Binding StartPoint}">
                                            <ArcSegment Point="{Binding EndPoint}" Size="{Binding Size}" SweepDirection="Clockwise" />
                                        </PathFigure>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                        </Grid>
                        <Button x:Name="ExpandButton" Style="{StaticResource ExpandButtonStyle}" Background="{Binding Output, ElementName=ButtonBackground}" BorderBrush="{Binding Output, ElementName=ButtonPointerOverBrush}" Tag="{Binding ExpandAreaThickness, RelativeSource={RelativeSource TemplatedParent}}" DataContext="{Binding ExpandArc, RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1RadialColorItem Style -->
    <Style TargetType="c1:C1RadialColorItem" x:Key="ColorMenuItemStyle">
        <Setter Property="Padding" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1RadialColorItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="HighlightedElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="{StaticResource RadialMenuDisabledColor}" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="CheckElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="{StaticResource RadialMenuDisabledColor}" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HighlightedStates">
                                <VisualState x:Name="NonHighlighted" />
                                <VisualState x:Name="Highlighted">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HighlightedElement" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="HeaderPanel">
                            <!-- the next transparent sector is required for correct handling pointer events-->
                            <Path Fill="Transparent" DataContext="{Binding OuterArc, RelativeSource={RelativeSource TemplatedParent}}">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathFigure StartPoint="{Binding CenterPoint, RelativeSource={RelativeSource TemplatedParent}}" IsFilled="True" IsClosed="True">
                                            <PathFigure.Segments>
                                                <LineSegment Point="{Binding StartPoint}" />
                                                <ArcSegment Point="{Binding EndPoint}" SweepDirection="Clockwise" Size="{Binding Size}" />
                                                <LineSegment Point="{Binding CenterPoint, RelativeSource={RelativeSource TemplatedParent}}" />
                                            </PathFigure.Segments>
                                        </PathFigure>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                            <!-- inner arc -->
                            <!-- Note: C1RadialPanel sets attached properties for the inner arc of the C1RadialColorItem automatically, 
                                 based on C1RadialMenu size and ExpandAreaThickness property value. -->
                            <Path Stroke="{TemplateBinding Background}" DataContext="{Binding Path=(c1:C1RadialPanel.ArcSegmentDefinition), RelativeSource={RelativeSource TemplatedParent}}" StrokeThickness="{Binding Path=(c1:C1RadialPanel.ArcThickness), RelativeSource={RelativeSource TemplatedParent}}">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathFigure IsFilled="False" IsClosed="False" StartPoint="{Binding StartPoint}">
                                            <ArcSegment Point="{Binding EndPoint}" Size="{Binding Size}" SweepDirection="Clockwise" />
                                        </PathFigure>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                            <!-- outer arc -->
                            <Path Stroke="{TemplateBinding Background}" DataContext="{Binding ExpandArc, RelativeSource={RelativeSource TemplatedParent}}" StrokeThickness="{Binding ExpandAreaThickness, RelativeSource={RelativeSource TemplatedParent}}">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathFigure IsFilled="False" IsClosed="False" StartPoint="{Binding StartPoint}">
                                            <ArcSegment Point="{Binding EndPoint}" Size="{Binding Size}" SweepDirection="Clockwise" />
                                        </PathFigure>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                            <Path x:Name="CheckElement" StrokeThickness="1" Stroke="{TemplateBinding AccentBrush}" DataContext="{Binding CheckArc, RelativeSource={RelativeSource TemplatedParent}}">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathFigure IsFilled="False" IsClosed="False" StartPoint="{Binding StartPoint}">
                                            <ArcSegment Point="{Binding EndPoint}" Size="{Binding Size}" SweepDirection="Clockwise" />
                                        </PathFigure>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                            <Path Stroke="{TemplateBinding AccentBrush}" x:Name="HighlightedElement" DataContext="{Binding CheckArc, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed" StrokeThickness="2">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathFigure IsFilled="False" IsClosed="False" StartPoint="{Binding StartPoint}">
                                            <ArcSegment Point="{Binding EndPoint}" Size="{Binding Size}" SweepDirection="Clockwise" />
                                        </PathFigure>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                        </Grid>
                        <Button x:Name="ExpandButton" Style="{StaticResource ExpandButtonStyle}" Background="{TemplateBinding Background}" Tag="{Binding ExpandAreaThickness, RelativeSource={RelativeSource TemplatedParent}}" DataContext="{Binding ExpandArc, RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding HasItems, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityConverter}}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="C1RadialMenuNavigationButtonStyle" TargetType="Button">
        <Setter Property="FontFamily" Value="Segoe UI Symbol" />
        <Setter Property="FontSize" Value="20" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundEllipse">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="{StaticResource RadialMenuNavigationButtonOverColor}" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.1" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border" />
                                        <DoubleAnimation Duration="00:00:00.1" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Ellipse Fill="{TemplateBinding Background}" x:Name="BackgroundEllipse" />
                        <Ellipse x:Name="border" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="2" Fill="Transparent" />
                        <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="ContentControl" x:Key="coloredRingItemStyle">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Path Stroke="{TemplateBinding Background}" DataContext="{Binding (c1:C1RadialPanel.ArcSegmentDefinition), RelativeSource={RelativeSource TemplatedParent}}" StrokeThickness="{Binding (c1:C1RadialPanel.ArcThickness), RelativeSource={RelativeSource TemplatedParent}}">
                        <Path.Data>
                            <PathGeometry>
                                <PathFigure IsFilled="False" IsClosed="False" StartPoint="{Binding StartPoint}">
                                    <ArcSegment Point="{Binding EndPoint}" Size="{Binding Size}" SweepDirection="Clockwise" />
                                </PathFigure>
                            </PathGeometry>
                        </Path.Data>
                    </Path>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="c1:C1RadialBackgroundPresenter" x:Key="coloredRingStyle">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <c1:C1RadialPanel StartAngle="-180" EndAngle="180" c1:C1RadialPanel.ArcThickness="{Binding (c1:C1RadialPanel.ArcThickness), RelativeSource={RelativeSource TemplatedParent}}" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1RadialBackgroundPresenter">
                    <Grid>
                        <Ellipse Fill="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                        <ItemsPresenter />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Radial slider stuff -->
    <Style TargetType="ContentControl" x:Key="RadialMarkStyle">
        <Setter Property="Padding" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="6" />
                            <ColumnDefinition Width="26" />
                        </Grid.ColumnDefinitions>
                        <Rectangle Fill="{TemplateBinding BorderBrush}" Grid.Column="1" Height="1.5" VerticalAlignment="Center" Stretch="Fill" />
                        <Border Background="{TemplateBinding Background}" Grid.Column="2" VerticalAlignment="Center">
                            <ContentPresenter Margin="{TemplateBinding Padding}" RenderTransformOrigin="0.5,0.5" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}">
                                <!--Foreground="{TemplateBinding Foreground}"-->
                                <ContentPresenter.RenderTransform>
                                    <RotateTransform Angle="{Binding Path=(c1:C1RadialPanel.Angle), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource AngleConverter}, ConverterParameter=-1}" />
                                </ContentPresenter.RenderTransform>
                            </ContentPresenter> 
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="ContentControl" x:Key="RadialPointerStyle">
        <Setter Property="Padding" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="10" />
                            <ColumnDefinition Width="26" />
                        </Grid.ColumnDefinitions>
                        <Rectangle Fill="{TemplateBinding BorderBrush}" Grid.Column="0" Height="1.5" VerticalAlignment="Center" Stretch="Fill" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="c1:C1RadialSlider" x:Key="radialSliderStyle">
          <Setter Property="ItemContainerStyle" Value="{StaticResource RadialMarkStyle}" />
                <Setter Property="PointerStyle" Value="{StaticResource RadialPointerStyle}" />
                    <Setter Property="ItemsPanel">
                        <Setter.Value>
                                <ItemsPanelTemplate>
                                    <c1:C1RadialPanel SetExplicitAngles="True" />
                                </ItemsPanelTemplate>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="c1:C1RadialSlider">
                                    <Grid x:Name="LayoutRoot">
                                         <c1:C1RadialPanel x:Name="PointerPanel" SetExplicitAngles="True" />
                                        <Ellipse Fill="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                                        <Ellipse StrokeThickness="2" Stroke="{TemplateBinding CircularBrush}" Margin="{TemplateBinding Padding}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                                        <ItemsPresenter />
                                    </Grid>
                                </ControlTemplate>
                        </Setter.Value>
                </Setter>
    </Style>

    <Style TargetType="c1:C1RadialMenu">
        <Setter Property="Foreground" Value="{StaticResource RadialMenuForegroundBrush}" />
        <Setter Property="Background" Value="{StaticResource RadialMenuBackgroundBrush}" />
        <Setter Property="Width" Value="260" />
        <Setter Property="Height" Value="260" />
        <Setter Property="FontFamily" Value="Arial" />
        <Setter Property="FontSize" Value="10" />
        <Setter Property="AccentBrush" Value="{StaticResource RadialMenuAccentBrush}" />
        <Setter Property="NavigationButtonStyle" Value="{StaticResource C1RadialMenuNavigationButtonStyle}" />
        <Setter Property="BorderBrush" Value="{StaticResource RadialMenuBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="AutoCollapse" Value="True" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource RadialMenuItemStyle}" />
        <Setter Property="ColorItemStyle" Value="{StaticResource ColorMenuItemStyle}" />
        <Setter Property="RadialSliderStyle" Value="{StaticResource radialSliderStyle}" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <c1:C1RadialPanel StartAngle="-180" EndAngle="180" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BackIcon">
          <Setter.Value>
            <TextBlock FontFamily="Wingdings" Text="ß" FontSize="18" Margin="0,0,0,-4" />
          </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1RadialMenu">
                    <Popup x:Name="ContextMenuPopup" FlowDirection="{TemplateBinding FlowDirection}">
                         <Popup.AllowsTransparency>
                                <s:Boolean>True</s:Boolean>
                              </Popup.AllowsTransparency>
                        <Canvas x:Name="PositioningPanel">
                            <Grid x:Name="MainPanel" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Opacity="{TemplateBinding Opacity}">
                                <Grid.Resources>
                                    <Storyboard x:Key="Expand">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="ItemsContainer">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <CubicEase EasingMode="EaseOut" />
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="ItemsContainer">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <CubicEase EasingMode="EaseOut" />
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(RotateTransform.Angle)" Storyboard.TargetName="ItemsContainer">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="-90" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <CubicEase EasingMode="EaseOut" />
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <Storyboard x:Key="Collapse">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="ItemsContainer">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <CubicEase EasingMode="EaseOut" />
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="ItemsContainer">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <CubicEase EasingMode="EaseOut" />
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(RotateTransform.Angle)" Storyboard.TargetName="ItemsContainer">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-90">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <CubicEase EasingMode="EaseOut" />
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <Storyboard x:Key="SubmenuOpen">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CurrentItemRing" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="EmptyEllipse">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.07" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <Storyboard x:Key="SubmenuClose">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.8" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CurrentItemRing" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CurrentItemRing">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.03" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <Storyboard x:Key="ColorSubmenuOpen">
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CurrentItemRing" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="CurrentItemRing">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="CurrentItemRing">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0.35" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0.35" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ColorPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        
                                        
                                        <BooleanAnimationUsingKeyFrames Storyboard.TargetName="CurrentItemRing" Storyboard.TargetProperty="IsHitTestVisible">
                                            <DiscreteBooleanKeyFrame KeyTime="0:0:0.1" Value="True" />
                                        </BooleanAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <Storyboard x:Key="ColorSubmenuClose">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.35" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.35" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="CurrentItemRing">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.5" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="CurrentItemRing">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.5" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CurrentItemRing" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.09">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ColorPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        
                                        
                                        <BooleanAnimationUsingKeyFrames Storyboard.TargetName="CurrentItemRing" Storyboard.TargetProperty="IsHitTestVisible">
                                            <DiscreteBooleanKeyFrame KeyTime="0" Value="False" />
                                        </BooleanAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <Storyboard x:Key="RadialSliderOpen">
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CurrentItemRing" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.1">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <!--CurrentItemRing-->
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CurrentItemRing">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.03" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <!--CurrentItemRing-->
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0.35" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0.35" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <!--RadialSlider-->
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="RadialSlider">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.03" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        
                                        
                                        <BooleanAnimationUsingKeyFrames Storyboard.TargetName="RadialSlider" Storyboard.TargetProperty="IsHitTestVisible">
                                            <DiscreteBooleanKeyFrame KeyTime="0" Value="True" />
                                        </BooleanAnimationUsingKeyFrames>
                                        <!--RadialSlider-->
                                        <!--CurrentItemPresenter-->
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        
                                        
                                        <BooleanAnimationUsingKeyFrames Storyboard.TargetName="CurrentItemPresenter" Storyboard.TargetProperty="IsHitTestVisible">
                                            <DiscreteBooleanKeyFrame KeyTime="0" Value="False" />
                                        </BooleanAnimationUsingKeyFrames>
                                    </Storyboard>
                                    <Storyboard x:Key="RadialSliderClose">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.35" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.35" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="RadialSlider">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        
                                        
                                        <BooleanAnimationUsingKeyFrames Storyboard.TargetName="RadialSlider" Storyboard.TargetProperty="IsHitTestVisible">
                                            <DiscreteBooleanKeyFrame KeyTime="0" Value="False" />
                                        </BooleanAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CurrentItemPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        
                                        
                                        <BooleanAnimationUsingKeyFrames Storyboard.TargetName="CurrentItemPresenter" Storyboard.TargetProperty="IsHitTestVisible">
                                            <DiscreteBooleanKeyFrame KeyTime="0" Value="True" />
                                        </BooleanAnimationUsingKeyFrames>
                                    </Storyboard>
                                </Grid.Resources>
                                <Grid x:Name="ItemsContainer" RenderTransformOrigin="0.5,0.5" FlowDirection="{TemplateBinding FlowDirection}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
                                    <Grid.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="0" ScaleY="0" CenterX="0.5" CenterY="0.5" />
                                            <RotateTransform Angle="0" />
                                        </TransformGroup>
                                    </Grid.RenderTransform>
                                    <ToolTipService.ToolTip>
                                        <ToolTip x:Name="ToolTip" SnapsToDevicePixels="True" Placement="{TemplateBinding ToolTipPlacement}" ContentTemplate="{TemplateBinding ToolTipTemplate}" Foreground="Black">
                                        </ToolTip>
                                    </ToolTipService.ToolTip>
                                    <Ellipse Fill="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{Binding ExpandAreaThickness, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                                    <!-- RadialSlider used to show radial gauge -->
                                    <c1:C1RadialSlider x:Name="RadialSlider" Opacity="0" IsHitTestVisible="False" FlowDirection="{TemplateBinding FlowDirection}" Foreground="{TemplateBinding Foreground}" Margin="{Binding ExpandAreaThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoubleToThicknessConverter}}" Style="{TemplateBinding RadialSliderStyle}" />
                                    <!-- ColorPresenter used to show C1RadialColorItem submenu -->
                                    <c1:C1RadialColorItemsPresenter x:Name="ColorPresenter" Opacity="0" FlowDirection="{TemplateBinding FlowDirection}" ItemTemplate="{TemplateBinding ItemTemplate}" ItemsPanel="{TemplateBinding ItemsPanel}" />
                                    <!-- CurrentItemPresenter represents C1RadialMenu and C1RadialItem submenus -->
                                    <c1:C1RadialMenuItemsPresenter x:Name="CurrentItemPresenter" RenderTransformOrigin="0.5,0.5" FlowDirection="{TemplateBinding FlowDirection}" ItemsSource="{Binding Path=CurrentItem.Items, RelativeSource={RelativeSource TemplatedParent}}" ItemContainerStyle="{TemplateBinding ItemContainerStyle}" ItemTemplate="{TemplateBinding ItemTemplate}" ItemsPanel="{TemplateBinding ItemsPanel}">
                                                <UIElement.RenderTransform>
                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="1" />
                                                </UIElement.RenderTransform>
                                    </c1:C1RadialMenuItemsPresenter>
                                    <!-- the next element is used to animate color submenu exand/collapse actions. IsHitTestVisible MUST BE false! -->
                                    <c1:C1RadialBackgroundPresenter x:Name="CurrentItemRing" IsHitTestVisible="False" RenderTransformOrigin="0.5,0.5" FlowDirection="{TemplateBinding FlowDirection}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Visibility="Collapsed" ItemContainerStyle="{StaticResource coloredRingItemStyle}" Style="{StaticResource coloredRingStyle}" Margin="{Binding ExpandAreaThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoubleToThicknessConverter}}" c1:C1RadialPanel.ArcThickness="{Binding ExpandAreaThickness, RelativeSource={RelativeSource TemplatedParent}}">
                                                                <UIElement.RenderTransform>
                                                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1" ScaleY="1" />
                                                                </UIElement.RenderTransform>
                                    </c1:C1RadialBackgroundPresenter>
                                    <!-- the next element is used to animate color submenu exand/collapse actions. IsHitTestVisible MUST BE false! -->
                                    <Ellipse x:Name="EmptyEllipse" Opacity="0" IsHitTestVisible="False" Margin="{Binding ExpandAreaThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoubleToThicknessConverter}}" Stroke="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" StrokeThickness="{Binding ExpandAreaThickness, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                                </Grid>
                                <Button x:Name="NavigationButton" Padding="5 0 5 5" Margin="-5" BorderBrush="{TemplateBinding AccentBrush}" Foreground="{TemplateBinding AccentBrush}" Background="{TemplateBinding Background}" Style="{TemplateBinding NavigationButtonStyle}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                            </Grid>
                        </Canvas>
                    </Popup>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
