<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="SchedulerSamples.DefaultSchedulerWindow" 
             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:c1sched="clr-namespace:C1.WPF.Schedule;assembly=C1.WPF.Schedule.4" xmlns:local="clr-namespace:SchedulerSamples">

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
		</Grid.RowDefinitions>

		<Border Grid.Row="0" Margin=" 0 0 0 10">
			<StackPanel Margin="3" Orientation="Horizontal">
				<Label Foreground="{DynamicResource text_Brush}" Content="Theme:" VerticalAlignment="Center" />
				<ComboBox x:Name="themes" SelectedIndex="1" SelectionChanged="themes_SelectionChanged" Margin="5" IsEditable="False" IsReadOnly="True" Width="110" ToolTip="Change Theme">
					<ComboBox.Items>
                        <sys:String>Office 2016 Black</sys:String>
                        <sys:String>Office 2016 Colorful</sys:String>
                        <sys:String>Office 2016 DarkGray</sys:String>
                        <sys:String>Office 2016 White</sys:String>
                        <sys:String>Office 2010 Black</sys:String>
                        <sys:String>Office 2010 Blue</sys:String>
                        <sys:String>Office 2010 Silver</sys:String>
                        <sys:String>Office 2007 Black</sys:String>
                        <sys:String>Office 2007 Blue</sys:String>
                        <sys:String>Office 2007 Silver</sys:String>
                        <sys:String>Dusk Blue</sys:String>
                        <sys:String>Dusk Green</sys:String>
                        <sys:String>Media Player</sys:String>
                        <sys:String>Vista</sys:String>
					</ComboBox.Items>
				</ComboBox>
				<Label Foreground="{DynamicResource text_Brush}" Content="View:" VerticalAlignment="Center" />
				<ComboBox x:Name="views" SelectedIndex="3" SelectionChanged="views_SelectionChanged" Margin="5" IsEditable="False" IsReadOnly="True" Width="90" ToolTip="Change View">
					<ComboBox.Items>
						<sys:String>Day</sys:String>
						<sys:String>Work Week</sys:String>
						<sys:String>Week</sys:String>
						<sys:String>Month</sys:String>
                        <sys:String>Time Line</sys:String>
                    </ComboBox.Items>
				</ComboBox>
				<Label Foreground="{DynamicResource text_Brush}" Content="Time Scale:" VerticalAlignment="Center" />
				<ComboBox x:Name="scale" SelectedIndex="2" IsEnabled="False" Margin="5" IsEditable="False" IsReadOnly="True" Width="90" 
                          ToolTip="Change Time Scale"/>

                <CheckBox Foreground="{DynamicResource text_Brush}" VerticalAlignment="Center" Content="Show work time only" Margin="5" IsChecked="{Binding ShowWorkTimeOnly, ElementName=scheduler1}" />

                <Button Name="Import" Margin="5" IsEnabled="True" Click="Import_Click" Padding="5,0">Load...
					<Button.ToolTip>
						<TextBlock>Load data from file</TextBlock>
					</Button.ToolTip>
				</Button>
				<Button Name="Export" Margin="5" IsEnabled="True" Click="Export_Click" Padding="5,0">Save...
					<Button.ToolTip>
						<TextBlock>Save data to file</TextBlock>
					</Button.ToolTip>
				</Button>
			</StackPanel>
		</Border>	
        <Grid SnapsToDevicePixels="True" Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="197" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <c1sched:C1Scheduler x:Name="scheduler1" Grid.Column="1" Margin="10 0 0 0" BorderThickness="1" ShowWorkTimeOnly="True" 
                                 ViewType="Month" SmallVisualIntervalScale="{Binding SelectedItem, ElementName=scale}">
				<c1sched:C1Scheduler.Settings>
					<c1sched:C1SchedulerSettings FirstVisibleTime="07:00:00" />
				</c1sched:C1Scheduler.Settings>
			</c1sched:C1Scheduler>

			<c1sched:C1Calendar Name="calendar1" Grid.Column="0" MaxSelectionCount="42" BorderThickness="1" 
                                SelectedDates="{Binding ElementName=scheduler1, Path=VisibleDates, Mode=OneWay}" 
                                BoldedDates="{Binding ElementName=scheduler1, Path=BoldedDates, Mode=OneWay}" 
                                GenerateAdjacentMonthDays="true"/>

        </Grid>
    </Grid>
</UserControl>