<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="SchedulerSamples.CustomCalendar" 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:sys="clr-namespace:System;assembly=mscorlib">
    <UserControl.Resources>
        <Thickness x:Key="C1Calendar_TodayBorder_Thickness">2,1,2,1</Thickness>
    </UserControl.Resources>
	<Grid x:Name="gr">
		<Viewbox Stretch="UniformToFill" StretchDirection="Both">
			<c1:C1Calendar x:Name="cal1" MonthHeaderForeground="#FFAD0A0A" MonthHeaderFontSize="14" MonthHeaderBackground="Transparent" Foreground="#FFC71212" WeekendBrush="Red" DaysOfWeekBorderBrush="#FF6F3A9E" TodayBrush="Yellow" MonthCount="5" MaxSelectionCount="42" Width="1000" Height="700">
				<c1:C1Calendar.Background>
					<ImageBrush ImageSource="green.jpg" />
				</c1:C1Calendar.Background>
				<c1:C1Calendar.Template>
					<ControlTemplate TargetType="{x:Type c1:C1Calendar}">
						<ControlTemplate.Resources>
							<Style TargetType="{x:Type RepeatButton}" x:Key="NavigationButtonStyle">
								<Setter Property="Template">
									<Setter.Value>
										<ControlTemplate>
											<ContentPresenter Content="{TemplateBinding RepeatButton.Content}" />
										</ControlTemplate>
									</Setter.Value>
								</Setter>
							</Style>
						</ControlTemplate.Resources>
						<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
							<Grid>
								<TextBlock Foreground="Yellow" Margin="110,42,0,0" HorizontalAlignment="Center" FontFamily="Segoe UI" FontStyle="Italic" FontSize="18">
									Looking for Summer...
								</TextBlock>
								<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="110,65,0,0">
									<RepeatButton Name="prevMonth" VerticalAlignment="Center" Command="c1:C1Calendar.PreviousMonthCommand" CommandTarget="{Binding RelativeSource={RelativeSource              AncestorType={x:Type c1:C1Calendar}}, Mode=OneWay}" Style="{StaticResource NavigationButtonStyle}">
                                        <RepeatButton.Template>
                                            <ControlTemplate>
                                                <Border Padding="{TemplateBinding Margin}" Background="Transparent">
                                                    <Polygon x:Name="pol" Points="8,0 0,4 10,8" Fill="Yellow" Margin="7,6,2,6" />
                                                </Border>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter TargetName="pol" Property="Points" Value="12,0 0,6 15,12" />
                                                        <Setter TargetName="pol" Property="Margin" Value="2,4,2,4" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </RepeatButton.Template>
                                    </RepeatButton>
									<Line Stroke="Yellow" X1="0" Y1="0" X2="700" Y2="0" StrokeThickness="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
                                    <RepeatButton Name="nextMonth" VerticalAlignment="Center" Command="c1:C1Calendar.NextMonthCommand" CommandTarget="{Binding RelativeSource={RelativeSource              AncestorType={x:Type c1:C1Calendar}}, Mode=OneWay}" Style="{StaticResource NavigationButtonStyle}">
                                        <RepeatButton.Template>
                                            <ControlTemplate>
                                                <Border Padding="{TemplateBinding Margin}" Background="Transparent">
                                                    <Polygon x:Name="pol" Points="0,0 10,4 2,8" Fill="Yellow" Margin="2,6,7,6" />
                                                </Border>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter TargetName="pol" Property="Points" Value="0,0 15,6 3,12" />
                                                        <Setter TargetName="pol" Property="Margin" Value="2,4,2,4" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </RepeatButton.Template>
                                    </RepeatButton>
								</StackPanel>
								<c1:C1CalendarPresenter />
							</Grid>
						</Border>
					</ControlTemplate>
				</c1:C1Calendar.Template>
				<c1:C1Calendar.MonthsPanel>
					<ItemsPanelTemplate>
						<c1:C1CarouselPanel HorizontalPathAlignment="Left" Margin="180,0,0,0" VerticalPathAlignment="Top" PathGeometry="M 220,0 A 400,200 10 1 0 520,100" PerspectiveAngle="0" PerspectiveFactor="0">
						</c1:C1CarouselPanel>
					</ItemsPanelTemplate>
				</c1:C1Calendar.MonthsPanel> 
				<c1:C1Calendar.MonthCalendarStyle>
					<Style TargetType="{x:Type c1:C1CalendarItem}">
						<Setter Property="Background" Value="#60FFFFE0" />
                        <Setter Property="ShowNextButton" Value="False" />
                        <Setter Property="ShowPreviousButton" Value="False" />
                        <Setter Property="DaySlotStyle">
							<Setter.Value>
								<Style>
									<Setter Property="TextElement.FontSize" Value="11" />
									<Style.Triggers>
										<EventTrigger RoutedEvent="UIElement.MouseEnter">
											<BeginStoryboard>
												<Storyboard>
													<DoubleAnimation To="20" Duration="0:0:0.1" Storyboard.TargetProperty="(TextElement.FontSize)" FillBehavior="HoldEnd" />
												</Storyboard>
											</BeginStoryboard>
										</EventTrigger>
										<EventTrigger RoutedEvent="UIElement.MouseLeave">
											<BeginStoryboard>
												<Storyboard>
													<DoubleAnimation To="11" Duration="0:0:0.1" Storyboard.TargetProperty="(TextElement.FontSize)" FillBehavior="Stop" />
												</Storyboard>
											</BeginStoryboard>
										</EventTrigger>
									</Style.Triggers>
								</Style>
							</Setter.Value>
						</Setter>
					</Style>
				</c1:C1Calendar.MonthCalendarStyle>
			</c1:C1Calendar>
		</Viewbox>
	</Grid>
</UserControl>