<Window x:Class="C1TreeViewDragDropSample2010.MainWindow"
        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"
        xmlns:local="clr-namespace:C1TreeViewDragDropSample2010">
    <Window.Resources>
        <Style x:Key="CE_SampleTextBkg" TargetType="Border">
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                        <GradientStop Color="#99071D2E" Offset="0.003"/>
                        <GradientStop Color="#00071D2E" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="CornerRadius" Value="2"/>
            <Setter Property="Height" Value="26"/>
            <Setter Property="Padding" Value="10 0 0 0"/>
        </Style>
        <local:CustomTemplateSelector x:Key="CustomTemplateSelector">
            <local:CustomTemplateSelector.Resources>
                <ResourceDictionary>
                    <c1:C1HierarchicalDataTemplate x:Key="DepartmentTemplate" ItemsSource="{Binding Employees}">
                        <StackPanel Orientation="Horizontal">
                            <Image Source="icons/group.png" Height="14" Width="14"/>
                            <TextBlock Text="{Binding Name}" VerticalAlignment="Center" Padding="4 0 4 0"/>
                        </StackPanel>
                    </c1:C1HierarchicalDataTemplate>
                    <DataTemplate x:Key="MaleEmployeeTemplate">
                        <StackPanel Orientation="Horizontal">
                            <Image Source="icons/manager.png" Height="14" Width="14"/>
                            <TextBlock Text="{Binding Name}" VerticalAlignment="Center" Padding="4 0 4 0"/>
                        </StackPanel>
                    </DataTemplate>
                    <DataTemplate x:Key="FemaleEmployeeTemplate">
                        <StackPanel Orientation="Horizontal">
                            <Image Source="icons/assistant.png" Height="14" Width="14"/>
                            <TextBlock Text="{Binding Name}" VerticalAlignment="Center" Padding="4 0 4 0"/>
                        </StackPanel>
                    </DataTemplate>
                </ResourceDictionary>
            </local:CustomTemplateSelector.Resources>
        </local:CustomTemplateSelector>
        <SolidColorBrush x:Key="CE_SampleForeground" Color="#FFF0F8FE"/>
        <Style x:Key="CE_SampleText" TargetType="TextBlock">
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="TextWrapping" Value="Wrap" />
            <Setter Property="Foreground" Value="#FFF0F8FE" />
            <Setter Property="FontFamily" Value="Portable User Interface" />
            <Setter Property="FontSize" Value="11" />
        </Style>
    </Window.Resources>

    <Grid>
        <c1:C1TabControl>
            <c1:C1TabItem Header="Basic">
                <Grid x:Name="LayoutRoot">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Border Style="{StaticResource CE_SampleTextBkg}" Margin="0 0 0 10">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="DragDrop Action:" Style="{StaticResource CE_SampleText}" Margin="0 0 5 0"/>
                            <RadioButton x:Name="Move" Content="Move" IsChecked="True" GroupName="DragDropEffect" Checked="OnButtonChecked" Grid.Column="1" Foreground="{StaticResource CE_SampleForeground}" Margin="0,4,5,0"/>
                            <RadioButton x:Name="Copy" Content="Copy" GroupName="DragDropEffect" Checked="OnButtonChecked" Grid.Row="1" Grid.Column="2" Foreground="{StaticResource CE_SampleForeground}" Margin="0,4,0,0"/>
                        </StackPanel>
                    </Border>
                    <c1:C1TreeView x:Name="SampleTreeView" Grid.Row="1" Grid.ColumnSpan="2"  Width="355" BorderBrush="#FF8FB4CC" BorderThickness="3" ItemTemplateSelector="{StaticResource CustomTemplateSelector}" Padding="10"/>
                </Grid>
            </c1:C1TabItem>
            <c1:C1TabItem Header="Interaction">
                <local:Interaction />
            </c1:C1TabItem>
        </c1:C1TabControl>
    </Grid>
</Window>
