<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="SchedulerSamples.Grouping" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1sched="http://schemas.componentone.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml">
    <Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="197" />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>
		<Border Grid.Row="0" Grid.ColumnSpan="2" Margin="0 0 0 10">
			<StackPanel Margin="5" Orientation="Horizontal">
				<Label Foreground="{DynamicResource text_Brush}" Content="Group by:" VerticalAlignment="Center" />
				<ComboBox x:Name="cmbGroup" Margin="5" SelectionChanged="ComboBox_SelectionChanged" />
				<Label Foreground="{DynamicResource text_Brush}" Content="Group navigation:" VerticalAlignment="Center" />
                <Button Margin="2,5" Height="20" Width="20" Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" CommandParameter="Home" CommandTarget="{Binding ElementName=sched1}">
                    <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="1,1.5" Stretch="Fill" Width="8" Height="8" />
                </Button>
                <Button Margin="2,5" Height="20" Width="20" Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" CommandParameter="Page" CommandTarget="{Binding ElementName=sched1}">
                    <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 L1,6 L1,5 L0,5 L0,3 L1,3 L1,2 L2,2 L2,1 L3,1 z" Fill="Black" HorizontalAlignment="Left" Height="8" RenderTransformOrigin="0.3408,1.5" Stretch="Fill" VerticalAlignment="Top" Width="10" />
                </Button>
                <Button Margin="2,5" Height="20" Width="20" Command="c1sched:C1Scheduler.NavigateToPreviousGroupCommand" CommandTarget="{Binding ElementName=sched1}">
                    <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.852,1.5" Stretch="Fill" Width="4" Height="8" VerticalAlignment="Top" Margin="0" />
                </Button>
                <Button Margin="2,5" Height="20" Width="20" Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" CommandTarget="{Binding ElementName=sched1}">
                    <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" Width="4" Height="8" />
                </Button>
                <Button Margin="2,5" Height="20" Width="20" Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" CommandParameter="Page" CommandTarget="{Binding ElementName=sched1}">
                    <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" Height="8" Width="9.5" />
                </Button>
                <Button Margin="2,5" Height="20" Width="20" Command="c1sched:C1Scheduler.NavigateToNextGroupCommand" CommandParameter="End" CommandTarget="{Binding ElementName=sched1}">
                    <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" Height="8" Width="8.5" />
                </Button>
                <Label Foreground="{DynamicResource text_Brush}" Content="Group page size:" VerticalAlignment="Center" />
                <c1:C1NumericBox Margin="2" VerticalAlignment="Center" Value="{Binding GroupPageSize, ElementName=sched1, Mode=TwoWay}" Minimum="1" Maximum="5" MinWidth="35" />
                <Label Foreground="{DynamicResource text_Brush}" Content="View:" VerticalAlignment="Center" />
                <ComboBox x:Name="views" SelectedIndex="4" SelectionChanged="views_SelectionChanged" Margin="5" IsEditable="False" IsReadOnly="True" Width="100" 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>
            </StackPanel>
		</Border>

		<c1sched:C1Calendar x:Name="cal1" Grid.Row="1" Grid.Column="0" BorderThickness="1" 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}" Theme="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=c1sched:CalendarBase, ResourceId=MediaPlayer}}" MaxSelectionCount="42" />

		<c1sched:C1Scheduler Grid.Row="1" Grid.Column="1" x:Name="sched1" GroupPageSize="2" Margin="10,0,0,0" Style="{Binding TimeLineStyle, RelativeSource={RelativeSource Self}}" BorderThickness="1">
			<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>