<?xml version="1.0" encoding="utf-8"?>
<UserControl mc:Ignorable="d" x:Class="C1Extended_Demo.CalendarBookTop" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="CalendarBookResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style x:Key="MonthButton" TargetType="Button">
                <Setter Property="Background" Value="#FF0C2934" />
                <Setter Property="FontFamily" Value="Times New Roman" />
                <Setter Property="Foreground" Value="#ff10657a" />
                <Setter Property="Padding" Value="1 2 1 1" />
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFA3AEB9" Offset="0" />
                            <GradientStop Color="#FF8399A9" Offset="0.375" />
                            <GradientStop Color="#FF718597" Offset="0.375" />
                            <GradientStop Color="#FF617584" Offset="1" />
                        </LinearGradientBrush>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Grid>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal" />
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                        <DiscreteObjectKeyFrame.Value>
                                                            <Visibility>Visible</Visibility>
                                                        </DiscreteObjectKeyFrame.Value>
                                                    </DiscreteObjectKeyFrame>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed" />
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value=".55" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Unfocused" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>

                                <Rectangle x:Name="rectangle" Fill="White" Stroke="#FF8899A9" Grid.RowSpan="2" RadiusX="2" RadiusY="2" StrokeThickness="2" Visibility="Collapsed">
                                    <Rectangle.Effect>
                                        <DropShadowEffect ShadowDepth="0" Color="#FF00D0FF" BlurRadius="8" />
                                    </Rectangle.Effect>
                                </Rectangle>
                                <Rectangle Fill="White" Stretch="Fill" Stroke="#FF8899A9" StrokeThickness="2" Grid.RowSpan="2" RadiusX="2" RadiusY="2" />
                                <Border BorderBrush="#FF8899A9" BorderThickness="1" CornerRadius="2" Background="#FFAAC3CB" />
                                <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                <Path Fill="#FFFFFFFF" Stretch="Fill" Height="12" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="12" UseLayoutRounding="False" Grid.Row="1" Data="M0,3 C0,1.3431457 1.3431457,0 3,0 L17,0 C18.656855,0 20,1.3431457 20,3 C20,3 3,20 3,20 C1.3431457,20 0,18.656855 0,17 z" Stroke="#FF8899A9" StrokeThickness="1" />
                                <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" RadiusX="3" RadiusY="3" IsHitTestVisible="false" Opacity="0" Grid.RowSpan="2" />
                                <Rectangle x:Name="FocusVisualElement" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="2" RadiusY="2" Margin="1" IsHitTestVisible="false" Opacity="0" />
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    <Border Background="White" CornerRadius="10,10,5,5" Width="400">
        <Grid>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="50" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Border BorderThickness="2,2,2,3" CornerRadius="5,5,0,0">
                    <Border.BorderBrush>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FF425E76" Offset="0" />
                            <GradientStop Color="#FF788C9F" Offset="0.651" />
                            <GradientStop Color="#FF425E76" Offset="1" />
                        </LinearGradientBrush>
                    </Border.BorderBrush>
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FF245A76" Offset="0" />
                            <GradientStop Color="#FF6B91AA" Offset="0.583" />
                            <GradientStop Color="#FF759AB5" Offset="0.665" />
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                    <TextBlock Text="20" TextWrapping="Wrap" FontSize="90" FontFamily="Times New Roman">
					<TextBlock.Foreground>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FF134659" Offset="0.2" />
							<GradientStop Color="#FF0C2934" Offset="0.3" />
							<GradientStop Color="#FF13455A" Offset="0.404" />
						</LinearGradientBrush>
					</TextBlock.Foreground>
                    </TextBlock>
                    <TextBlock Text="10" TextWrapping="Wrap" FontSize="90" FontFamily="Times New Roman" Margin="-4,0,0,0">
					<TextBlock.Foreground>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FFC4C9CD" Offset="0.2" />
							<GradientStop Color="DarkGray" Offset="0.3" />
							<GradientStop Color="#FFFCFCFC" Offset="0.4" />
						</LinearGradientBrush>
					</TextBlock.Foreground>
                    </TextBlock>
                </StackPanel>
                <TextBlock x:Name="month" Text="{Binding Name}" TextWrapping="Wrap" FontSize="32" FontFamily="Times New Roman" Foreground="White" Margin="20,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left">
				<TextBlock.Effect>
					<DropShadowEffect BlurRadius="2" ShadowDepth="2" Color="#FF2C4A64" />
				</TextBlock.Effect>
                </TextBlock>
                <Path Stretch="Fill" UseLayoutRounding="False" Data="M0,0 L493.79904,0 C497.28104,1.4098798 499.49084,8.2246914 500,22.265001 L500,61.752743 L493.36795,60.268562 C456.3688,52.313362 416.7272,48.000004 375.5,48.000008 C191.56329,48.000004 39.188137,133.8588 12.234431,245.94026 L11.340348,250 L0,250 z">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.428,0.832" StartPoint="0.246,-0.03">
                            <GradientStop Color="#0CFFFFFF" Offset="0" />
                            <GradientStop Color="#4CFFFFFF" Offset="1" />
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <ItemsControl x:Name="months" Grid.Row="1" Margin="8,8,8,31">
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <c1:C1UniformGrid Rows="2" Columns="6" />
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Button Content="{Binding Month.Name}" Style="{StaticResource MonthButton}" Margin="8" Click="Button_Click" IsEnabled="{Binding Current}" />
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </Grid>
        	<Grid x:Name="Spiral" VerticalAlignment="Bottom">
        		<Grid.RowDefinitions>
        			<RowDefinition Height="3" />
        			<RowDefinition Height="7" />
        			<RowDefinition Height="8" />
        		</Grid.RowDefinitions>
        		<Grid.ColumnDefinitions>
	        		<ColumnDefinition Width="*" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="1" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="1" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="1" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="1" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="10*" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="1" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="1" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="1" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="1" />
					<ColumnDefinition Width="3" />
					<ColumnDefinition Width="2" />
					<ColumnDefinition Width="*" />
        		</Grid.ColumnDefinitions>
        		<Rectangle Style="{StaticResource SpiralHole}" Grid.ColumnSpan="5" Grid.RowSpan="2" Grid.Column="1" />
        		<Rectangle Style="{StaticResource SpiralHole}" Grid.ColumnSpan="5" Grid.RowSpan="2" Grid.Column="7" />
        		<Rectangle Style="{StaticResource SpiralHole}" Grid.ColumnSpan="5" Grid.RowSpan="2" Grid.Column="13" />
        		<Rectangle Style="{StaticResource SpiralHole}" Grid.ColumnSpan="5" Grid.RowSpan="2" Grid.Column="19" />
        		<Rectangle Style="{StaticResource SpiralHole}" Grid.RowSpan="2" Grid.Column="25" Grid.ColumnSpan="5" />
        		<Rectangle Style="{StaticResource SpiralHole}" Grid.RowSpan="2" Grid.Column="31" Grid.ColumnSpan="5" />
        		<Rectangle Style="{StaticResource SpiralHole}" Grid.RowSpan="2" Grid.Column="37" Grid.ColumnSpan="5" />
        		<Rectangle Style="{StaticResource SpiralHole}" Grid.RowSpan="2" Grid.Column="43" Grid.ColumnSpan="5" />
        		<Border Style="{StaticResource SpiralTop}" Grid.RowSpan="2" Grid.Column="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="4" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="8" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="10" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="14" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="16" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="20" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="22" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="26" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="28" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="32" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="34" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="38" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="40" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="44" Grid.RowSpan="2" Grid.Row="1" />
        		<Border Style="{StaticResource SpiralTop}" Grid.Column="46" Grid.RowSpan="2" Grid.Row="1" />
        	</Grid>
        </Grid>
    </Border>    
</UserControl>