<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="C1DataGrid_Demo2010.AdHocMerging" 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:c1datagrid="clr-namespace:C1.Silverlight.DataGrid;assembly=C1.Silverlight.DataGrid.5" xmlns:c1="clr-namespace:C1.Silverlight;assembly=C1.Silverlight.5" xmlns:c1toolbar="clr-namespace:C1.Silverlight.Toolbar;assembly=C1.Silverlight.Toolbar.5">
    <UserControl.Resources>
        <c1toolbar:C1ToolbarCommand x:Key="cmdMergeCells" LabelTitle="Merge Cells" LargeImageSource="/C1DataGrid_Demo2010.5;component/Resources/MergeCells_1.png" SmallImageSource="/C1DataGrid_Demo2010.5;component/Resources/MergeCells.png" />
        <c1toolbar:C1ToolbarCommand x:Key="cmdUnmergeCells" LabelTitle="Unmerge Cells" LargeImageSource="/C1DataGrid_Demo2010.5;component/Resources/SplitCells_1.png" SmallImageSource="/C1DataGrid_Demo2010.5;component/Resources/SplitCells.png" />
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <c1toolbar:C1Toolbar Background="Transparent" BorderThickness="0">
                <c1toolbar:C1ToolbarGroup Header="Merge &amp; Center">
                    <c1toolbar:C1ToolbarGroup.GroupSizeDefinitions>
                        <c1toolbar:C1ToolbarGroupSizeDefinition>
                            <c1toolbar:C1ToolbarControlSize>Large</c1toolbar:C1ToolbarControlSize>
                        </c1toolbar:C1ToolbarGroupSizeDefinition>
                    </c1toolbar:C1ToolbarGroup.GroupSizeDefinitions>
                    <c1toolbar:C1ToolbarButton c1:CommandExtensions.Command="{StaticResource cmdMergeCells}" />
                    <c1toolbar:C1ToolbarButton c1:CommandExtensions.Command="{StaticResource cmdUnmergeCells}" />
                </c1toolbar:C1ToolbarGroup>
            </c1toolbar:C1Toolbar>
            <TextBlock Grid.Column="1" Margin="20" VerticalAlignment="Center" Text="Select a contiguous cell range by holding down the Shift key." />
        </Grid>

        <c1datagrid:C1DataGrid x:Name="grid" Grid.Row="1" SelectionMode="MultiRange" CanUserReorderColumns="False" CanUserSort="False" CanUserAddRows="False" CanUserEditRows="False" CanUserFilter="False" AlternatingRowBackground="White" RowBackground="White" GridLinesVisibility="All" Margin="0,10,0,0" />
    </Grid>
</UserControl>