<UserControl
    x:Class="BasicLibrarySamples.View.TreeViewSample"
    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="using:C1.Xaml"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <Style TargetType="TextBlock" x:Key="TextIconStyle">
                <Setter Property="FontSize" Value="20" />
                <Setter Property="FontFamily" Value="Segoe UI Symbol" />
                <Setter Property="FontWeight" Value="Normal" />
                <Setter Property="Foreground" Value="{ThemeResource AppBarItemForegroundThemeBrush}" />
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="Margin" Value="5 -2"/>
            </Style>
            
            <!--<Style TargetType="Image" x:Key="TreeIcon">
                <Setter Property="Width" Value="22" />
                <Setter Property="Height" Value="22" />
                <Setter Property="Margin" Value="8 0" />
            </Style>-->
            <Style TargetType="TextBlock" x:Key="TreeText">
                <!--<Setter Property="FontSize" Value="11" />
                <Setter Property="Margin" Value="4 0 0 0" />-->
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
            <CheckBox Content="Show Lines" IsChecked="{Binding ElementName=WindowExplorerTreeView, Path=ShowLines, Mode=TwoWay}" Margin="5"/>
            <CheckBox Content="Expand on Click/Tap" IsChecked="{Binding ElementName=WindowExplorerTreeView, Path=ExpandOnClick, Mode=TwoWay}" Margin="5"/>

        </StackPanel>
        <c1:C1TreeView x:Name="WindowExplorerTreeView" Grid.Row="1"  ShowLines="False" >
            <c1:C1TreeViewItem IsExpanded="True">
                <c1:C1TreeViewItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                        <TextBlock Style="{StaticResource TreeText}" Text="Desktop" />
                    </StackPanel>
                </c1:C1TreeViewItem.Header>
                <c1:C1TreeViewItem >
                    <c1:C1TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                            <TextBlock Style="{StaticResource TreeText}" Text="User" />
                        </StackPanel>
                    </c1:C1TreeViewItem.Header>
                </c1:C1TreeViewItem>
                <c1:C1TreeViewItem IsExpanded="True">
                    <c1:C1TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                            <TextBlock Style="{StaticResource TreeText}" Text="Public" />
                        </StackPanel>
                    </c1:C1TreeViewItem.Header>
                    <c1:C1TreeViewItem>
                        <c1:C1TreeViewItem.Header>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                                <TextBlock Style="{StaticResource TreeText}" Text="Favorites" />
                            </StackPanel>
                        </c1:C1TreeViewItem.Header>
                    </c1:C1TreeViewItem>
                    <c1:C1TreeViewItem>
                        <c1:C1TreeViewItem.Header>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                                <TextBlock Style="{StaticResource TreeText}" Text="Public Downloads" />
                            </StackPanel>
                        </c1:C1TreeViewItem.Header>
                    </c1:C1TreeViewItem>
                    <c1:C1TreeViewItem>
                        <c1:C1TreeViewItem.Header>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                                <TextBlock Style="{StaticResource TreeText}" Text="Public Music" />
                            </StackPanel>
                        </c1:C1TreeViewItem.Header>
                    </c1:C1TreeViewItem>
                    <c1:C1TreeViewItem>
                        <c1:C1TreeViewItem.Header>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                                <TextBlock Style="{StaticResource TreeText}" Text="Public Pictures" />
                            </StackPanel>
                        </c1:C1TreeViewItem.Header>
                    </c1:C1TreeViewItem>
                    <c1:C1TreeViewItem>
                        <c1:C1TreeViewItem.Header>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                                <TextBlock Style="{StaticResource TreeText}" Text="Public Videos" />
                            </StackPanel>
                        </c1:C1TreeViewItem.Header>
                    </c1:C1TreeViewItem>
                </c1:C1TreeViewItem>
                <c1:C1TreeViewItem IsExpanded="True">
                    <c1:C1TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="" FontSize="28" Style="{StaticResource TextIconStyle}" />
                            <TextBlock Style="{StaticResource TreeText}" Text="Computer" Margin="5 7 5 0" />
                        </StackPanel>
                    </c1:C1TreeViewItem.Header>
                    <c1:C1TreeViewItem IsExpanded="True">
                        <c1:C1TreeViewItem.Header>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                                <TextBlock Style="{StaticResource TreeText}" Text="Local Disk (C:)" />
                            </StackPanel>
                        </c1:C1TreeViewItem.Header>
                        <c1:C1TreeViewItem>
                            <c1:C1TreeViewItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                                    <TextBlock Style="{StaticResource TreeText}" Text="Program Files" />
                                </StackPanel>
                            </c1:C1TreeViewItem.Header>
                        </c1:C1TreeViewItem>
                        <c1:C1TreeViewItem>
                            <c1:C1TreeViewItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                                    <TextBlock Style="{StaticResource TreeText}" Text="Users" />
                                </StackPanel>
                            </c1:C1TreeViewItem.Header>
                        </c1:C1TreeViewItem>
                        <c1:C1TreeViewItem>
                            <c1:C1TreeViewItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                                    <TextBlock Style="{StaticResource TreeText}" Text="Windows" />
                                </StackPanel>
                            </c1:C1TreeViewItem.Header>
                        </c1:C1TreeViewItem>
                    </c1:C1TreeViewItem>
                    <c1:C1TreeViewItem>
                        <c1:C1TreeViewItem.Header>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock FontSize="28" Text="⦾" Style="{StaticResource TextIconStyle}" />
                                <TextBlock Style="{StaticResource TreeText}" Margin="5 7 5 0" Text="DVD Drive (D:)" />
                            </StackPanel>
                        </c1:C1TreeViewItem.Header>
                    </c1:C1TreeViewItem>
                </c1:C1TreeViewItem>
                <c1:C1TreeViewItem>
                    <c1:C1TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock FontSize="28" Text="" Style="{StaticResource TextIconStyle}" />
                            <TextBlock Style="{StaticResource TreeText}" Margin="5 7 5 0" Text="Network" />
                        </StackPanel>
                    </c1:C1TreeViewItem.Header>
                </c1:C1TreeViewItem>
                <c1:C1TreeViewItem>
                    <c1:C1TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                            <TextBlock Style="{StaticResource TreeText}" Text="Control Panel" />
                        </StackPanel>
                    </c1:C1TreeViewItem.Header>
                </c1:C1TreeViewItem>
                <c1:C1TreeViewItem>
                    <c1:C1TreeViewItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="" Style="{StaticResource TextIconStyle}" />
                            <TextBlock Style="{StaticResource TreeText}" Text="Recycle Bin" />
                        </StackPanel>
                    </c1:C1TreeViewItem.Header>
                </c1:C1TreeViewItem>
            </c1:C1TreeViewItem>
        </c1:C1TreeView>
    </Grid>
</UserControl>
