<Window x:Class="Grouping.MainWindow" Title="Scheduler grouping sample" Height="600" Width="1024" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" >
    <Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="192" />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>
        <ToolBarTray Grid.Row="0" Grid.ColumnSpan="2">
            <ToolBar Band="1" BandIndex="1">
                <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="4,2" Text="Group by:" />
                <ComboBox x:Name="cmbGroup" Margin="2" SelectionChanged="ComboBox_SelectionChanged" />
                <Separator />
                <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="4,2" Text="Group navigation:" />
                <Button Content="|&lt;&lt;" Margin="2" Command="c1:C1Scheduler.NavigateToPreviousGroupCommand" CommandParameter="Home" CommandTarget="{Binding ElementName=sched1}" />
                <Button Content="&lt;&lt;" Margin="2" Command="c1:C1Scheduler.NavigateToPreviousGroupCommand" CommandParameter="Page" CommandTarget="{Binding ElementName=sched1}" />
                <Button Content="&lt;" Margin="2" Command="c1:C1Scheduler.NavigateToPreviousGroupCommand" CommandTarget="{Binding ElementName=sched1}" />
                <Button Content="&gt;" Margin="2" Command="c1:C1Scheduler.NavigateToNextGroupCommand" CommandTarget="{Binding ElementName=sched1}" />
                <Button Content="&gt;&gt;" Margin="2" Command="c1:C1Scheduler.NavigateToNextGroupCommand" CommandParameter="Page" CommandTarget="{Binding ElementName=sched1}" />
                <Button Content="&gt;&gt;|" Margin="2" Command="c1:C1Scheduler.NavigateToNextGroupCommand" CommandParameter="End" CommandTarget="{Binding ElementName=sched1}" />
                <Separator />
                <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="NoWrap" Margin="4,2" Text="Group page size:" />
                <c1:C1NumericBox Margin="2" Value="{Binding GroupPageSize, ElementName=sched1, Mode=TwoWay}" Minimum="1" Maximum="5" MinWidth="35" />
            </ToolBar>
            <ToolBar Band="1" BandIndex="2">
                <RadioButton x:Name="btnDay" Content="Day" CommandTarget="{Binding ElementName=sched1}" Command="c1:C1Scheduler.ChangeStyleCommand" CommandParameter="{Binding Path=OneDayStyle, ElementName=sched1}" />
                <RadioButton x:Name="btnWorkWeek" Content="Work Week" CommandTarget="{Binding ElementName=sched1}" Command="c1:C1Scheduler.ChangeStyleCommand" CommandParameter="{Binding Path=WorkingWeekStyle, ElementName=sched1}" />
                <RadioButton x:Name="btnWeek" Content="Week" CommandTarget="{Binding ElementName=sched1}" Command="c1:C1Scheduler.ChangeStyleCommand" CommandParameter="{Binding Path=WeekStyle, ElementName=sched1}" />
                <RadioButton x:Name="btnMonth" Content="Month" CommandTarget="{Binding ElementName=sched1}" Command="c1:C1Scheduler.ChangeStyleCommand" CommandParameter="{Binding Path=MonthStyle, ElementName=sched1}" />
                <RadioButton x:Name="btnTimeLine" Content="Time Line" CommandTarget="{Binding ElementName=sched1}" Command="c1:C1Scheduler.ChangeStyleCommand" CommandParameter="{Binding Path=TimeLineStyle, ElementName=sched1}" />
            </ToolBar>
        </ToolBarTray>
        <c1:C1Calendar x:Name="cal1" Grid.Row="1" Grid.Column="0" CalendarHelper="{Binding CalendarHelper, ElementName=sched1, Mode=OneWay}" SelectedDates="{Binding VisibleDates, ElementName=sched1, Mode=OneWay}" BoldedDates="{Binding BoldedDates, ElementName=sched1, Mode=OneWay}" MaxSelectionCount="42" />

        <c1:C1Scheduler Grid.Row="1" Grid.Column="1" x:Name="sched1">
			<c1:C1Scheduler.Settings>
				<c1:C1SchedulerSettings AllowCategoriesEditing="False" AllowCategoriesMultiSelection="False" AllowResourcesEditing="False" AllowResourcesMultiSelection="False" AllowContactsMultiSelection="True" AllowContactsEditing="True" FirstVisibleTime="08:00:00" />
			</c1:C1Scheduler.Settings>
		</c1:C1Scheduler>
	</Grid>
</Window>