<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="SchedulerSamples.CustomSchedulerStyles" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:local="clr-namespace:SchedulerSamples">
    <UserControl.Resources>
		<ResourceDictionary>
			<!-- ComponentResourceKey for the new theme which is defined in /themes/CustomSchedulerStylesDictionary.xaml -->
			<ResourceDictionary x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type c1:C1Scheduler},      ResourceId=custom_theme}" Source="CustomSchedulerStylesDictionary.xaml" />
		</ResourceDictionary>
    </UserControl.Resources>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
		</Grid.RowDefinitions>
		<Border Grid.Row="0" Style="{DynamicResource control_Border}" Margin="0 0 0 10">
			<StackPanel Margin="5" Orientation="Horizontal">
				<Label Margin="10,0,0,0" VerticalAlignment="Center" Foreground="{DynamicResource text_Brush}">View:</Label>
				<ComboBox x:Name="views" SelectedIndex="3" SelectionChanged="views_SelectionChanged" Margin="10,5" Width="160" IsEditable="False" IsReadOnly="True" ToolTip="Change View">
					<ComboBox.Items>
						<sys:String>Day</sys:String>
						<sys:String>Work Week</sys:String>
						<sys:String>Week</sys:String>
						<sys:String>Two Weeks</sys:String>
						<sys:String>Month</sys:String>
                        <sys:String>Time Line</sys:String>
                    </ComboBox.Items>
				</ComboBox>
				<Label Margin="10,0,0,0" VerticalAlignment="Center" Foreground="{DynamicResource text_Brush}">Palette:</Label>
				<ComboBox Margin="10,5" Width="160" SelectedIndex="0" SelectedItem="{Binding ElementName=scheduler1, Path=Background, Mode=TwoWay}" ToolTip="Change Palette" IsEditable="False" HorizontalContentAlignment="Stretch">
					<ComboBox.ItemTemplate>
						<DataTemplate>
							<Border Background="{Binding}" Margin="0" BorderThickness="1,0,0,1" Height="14">
								<Border>
									<Border.Background>
										<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
											<GradientStop Color="#D2FFFFFF" Offset="0" />
											<GradientStop Color="#00000000" Offset="1" />
										</LinearGradientBrush>
									</Border.Background>
								</Border>
							</Border>
						</DataTemplate>
					</ComboBox.ItemTemplate>
					<ComboBox.ItemContainerStyle>
						<Style TargetType="ListBoxItem">
							<Setter Property="Template">
								<Setter.Value>
									<ControlTemplate TargetType="ListBoxItem">
										<Grid>
											<ContentPresenter />
											<Border Name="brd" BorderThickness="2" BorderBrush="Transparent">
											</Border>
										</Grid>
										<ControlTemplate.Triggers>
											<Trigger Property="IsSelected" Value="true">
												<Setter TargetName="brd" Property="BorderBrush" Value="#FFFFAB3F" />
											</Trigger>
										</ControlTemplate.Triggers>
									</ControlTemplate>
								</Setter.Value>
							</Setter>
						</Style>
					</ComboBox.ItemContainerStyle>
                    <SolidColorBrush Color="#FFC2D4EB" />
                    <!-- Outlook 2007 -->
                    <SolidColorBrush Color="#FFC9E1D1" />
                    <SolidColorBrush Color="#FFDCECC9" />
                    <SolidColorBrush Color="#FFDABAC6" />
                    <SolidColorBrush Color="#FFCFDAE8" />
                    <SolidColorBrush Color="#FFB3DCDC" />
                    <SolidColorBrush Color="#FFD6B3B3" />
                    <SolidColorBrush Color="#FFE4E4C8" />
                    <SolidColorBrush Color="#FFC4B7DE" />
                    <SolidColorBrush Color="#FFCEC0A5" />
                    <SolidColorBrush Color="#FFB1CDC3" />
                    <SolidColorBrush Color="#FF9CBFD0" />
				</ComboBox>
			</StackPanel>
		</Border>

		<Grid Grid.Row="1">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="197" />
				<ColumnDefinition />
			</Grid.ColumnDefinitions>
			<c1:C1Scheduler Name="scheduler1" Grid.Column="1" Margin="10,0,0,0" BorderThickness="1" WeekStyle="{DynamicResource CustomWeekStyle}" WorkingWeekStyle="{DynamicResource CustomWorkingWeekStyle}" Theme="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=c1:C1Scheduler, ResourceId=custom_theme}}" Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=c1:C1Scheduler, ResourceId=MonthStyle}}">
			</c1:C1Scheduler>
 
			<c1:C1Calendar Name="calendar1" Grid.Column="0" MaxSelectionCount="42" VerticalAlignment="Stretch" SelectedDates="{Binding ElementName=scheduler1, Path=VisibleDates, Mode=OneWay}" BoldedDates="{Binding ElementName=scheduler1, Path=BoldedDates, Mode=OneWay}" GenerateAdjacentMonthDays="true" MonthCount="2" BorderThickness="1" Theme="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=c1:CalendarBase, ResourceId=MediaPlayer}}" />
		</Grid>
	</Grid>
</UserControl>