<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="Grouping.MainPage" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" 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>
		<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" SelectionChanged="ComboBoxGroup_SelectionChanged" />
			<TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="2" Text="Group navigation:" />
			<Button Content="|&lt;&lt;" Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" c1:CommandExtensions.CommandParameter="Home" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" />
			<Button Content="&lt;&lt;" Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" c1:CommandExtensions.CommandParameter="Page" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" />
			<Button Content="&lt;" Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" />
			<Button Content="&gt;" Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" />
			<Button Content="&gt;&gt;" Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" c1:CommandExtensions.CommandParameter="Page" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" />
			<Button Content="&gt;&gt;|" Margin="2" c1:CommandExtensions.Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" c1:CommandExtensions.CommandParameter="End" c1:CommandExtensions.CommandTarget="{Binding ElementName=sched1}" />
            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="2" Text="Group page size:" />
            <c1:C1NumericBox Margin="2" Value="{Binding GroupPageSize, ElementName=sched1, Mode=TwoWay}" Minimum="1" Maximum="5" MinWidth="35" />
            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="2" Text="View:" />
            <ComboBox x:Name="cmbView" Margin="2" SelectionChanged="ComboBoxView_SelectionChanged" MinWidth="100" />
        </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>