<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="Grouping.MainPage" mc:Ignorable="d" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:c1="clr-namespace:C1.Silverlight;assembly=C1.Silverlight.5" xmlns:c1sched="clr-namespace:C1.Silverlight.Schedule;assembly=C1.Silverlight.Schedule.5">

    <Grid x:Name="LayoutRoot" Background="White">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="192" />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>
		<Border Grid.Row="0" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="#FFA1ACB7">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFE1EDFE" Offset="0" />
					<GradientStop Color="#FFBBD8FD" Offset="0.4" />
					<GradientStop Color="#FFADD1FD" Offset="0.4" />
					<GradientStop Color="#FFBEDAFD" Offset="1" />
				</LinearGradientBrush>
			</Border.Background>
		</Border>
		<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2">
			<TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="2" Text="Group by:" />
			<ComboBox x:Name="cmbGroup" Margin="2,2,8,2" SelectionChanged="ComboBoxGroup_SelectionChanged" Width="85" Height="20" />
			<TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="2" Text="Group navigation:" />
			<Button c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" c1:CommandExtensions.CommandParameter="Home" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" Height="20" Width="20">
				<Path Data="M7,0 L8,0 L8,1 L8,2 L8,6 L8,7 L8,8 L7,8 L7,7 L6,7 L6,6 L5,6 L5,5 L4,5 L4,3 L5,3 L5,2 L6,2 L6,1 L7,1 z M0,0 L2,0 L2,8 L0,8 z" Fill="Black" HorizontalAlignment="Left" RenderTransformOrigin="0.925999939441681,1.50474989414215" Stretch="Fill" UseLayoutRounding="False" Width="8" Height="8" />
			</Button>
			<Button Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" c1:CommandExtensions.CommandParameter="Page" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" Height="20" Width="20">
				<Path Data="M9,0 L10,0 L10,1 L10,2 L10,6 L10,7 L10,8 L9,8 L9,7 L8,7 L8,6 L7,6 L7,5 L6,5 L6,3 L7,3 L7,2 L8,2 L8,1 L9,1 z M3,0 L4,0 L4,1 L4,2 L4,6 L4,7 L4,8 L3,8 L3,7 L2,7 L2,6 L0.99999994,6 L0.99999994,5 L0,5 L0,3 L0.99999994,3 L0.99999994,2 L2,2 L2,1 L3,1 z" Fill="Black" HorizontalAlignment="Left" Height="8" RenderTransformOrigin="0.340799951553345,1.50474989038147" Stretch="Fill" UseLayoutRounding="False" VerticalAlignment="Top" Width="10" />
			</Button>
			<Button Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" Height="20" Width="20">
				<Path Data="M3,0 L4,0 L4,1 L4,2 L4,6 L4,7 L4,8 L3,8 L3,7 L2,7 L2,6 L1,6 L1,5 L0,5 L0,3 L1,3 L1,2 L2,2 L2,1 L3,1 z" Fill="Black" HorizontalAlignment="Left" RenderTransformOrigin="0.851999894137194,1.50474987909943" Stretch="Fill" UseLayoutRounding="False" Width="4" Height="8" VerticalAlignment="Top" Margin="0" />
			</Button>
			<Button Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" Height="20" Width="20">
				<Path Data="M0,0 L1,0 L1,1 L2,1 L2,2 L3,2 L3,3 L4,3 L4,5 L3,5 L3,6 L2,6 L2,7 L1,7 L1,8 L0,8 z" Fill="Black" Stretch="Fill" UseLayoutRounding="False" Width="4" Height="8" d:LayoutOverrides="Width, Height, Margin" />
			</Button>
			<Button Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" c1:CommandExtensions.CommandParameter="Page" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" Height="20" Width="20">
				<Path Data="M5.5,0 L6.5,0 L6.5,1 L7.5,1 L7.5,2 L8.5,2 L8.5,3 L9.5,3 L9.5,5 L8.5,5 L8.5,6 L7.5,6 L7.5,7 L6.5,7 L6.5,8 L5.5,8 z M0,0 L1,0 L1,1 L2,1 L2,2 L3,2 L3,3 L4,3 L4,5 L3,5 L3,6 L2,6 L2,7 L1,7 L1,8 L0,8 z" Fill="Black" Stretch="Fill" UseLayoutRounding="False" d:LayoutOverrides="HorizontalAlignment" Height="8" Width="9.5" />
			</Button>
			<Button Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" c1:CommandExtensions.CommandParameter="End" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" Height="20" Width="20">
				<Path Data="M6.5,0 L8.5,0 L8.5,8 L6.5,8 z M0,0 L1,0 L1,1 L2,1 L2,2 L3,2 L3,3 L4,3 L4,5 L3,5 L3,6 L2,6 L2,7 L1,7 L1,8 L0,8 z" Fill="Black" Stretch="Fill" UseLayoutRounding="False" Height="8" Width="8.5" />
			</Button>
            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="8,2,2,2" Text="Group page size:" />
            <c1:C1NumericBox Margin="2,2,8,2" Value="{Binding GroupPageSize, ElementName=sched1, Mode=TwoWay}" Minimum="1" Maximum="5" MinWidth="35" Height="20" />
            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="2" Text="View:" />
            <ComboBox x:Name="cmbView" Margin="2" SelectionChanged="ComboBoxView_SelectionChanged" Height="20" Width="110" />
        </StackPanel>
		<c1sched:C1Calendar x:Name="cal1" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CalendarHelper="{Binding CalendarHelper, ElementName=sched1, Mode=OneWay}" SelectedDates="{Binding VisibleDates, ElementName=sched1, Mode=OneWay}" BoldedDates="{Binding BoldedDates, ElementName=sched1, Mode=OneWay}" MaxSelectionCount="42" />
        <c1sched:C1Scheduler Grid.Row="1" Grid.Column="1" x:Name="sched1" GroupPageSize="2" StyleChanged="sched1_StyleChanged">
			<c1sched:C1Scheduler.Settings>
				<c1sched:C1SchedulerSettings AllowCategoriesEditing="False" AllowCategoriesMultiSelection="False" AllowResourcesEditing="False" AllowResourcesMultiSelection="False" AllowContactsMultiSelection="True" AllowContactsEditing="True" FirstVisibleTime="08:00:00" />
			</c1sched:C1Scheduler.Settings>
		</c1sched:C1Scheduler>
	</Grid>
</UserControl>