<Window x:Class="TheBoxSoftware.DeveloperSuite.LiveDocumenter.ProjectManager"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:local="clr-namespace:TheBoxSoftware.DeveloperSuite.LiveDocumenter"
        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"
        UseLayoutRounding="True"
        Title="ProjectManager"
        Height="334" Width="416" ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
    <Window.Resources>
        <Style x:Key="HeaderStyle">
            <Setter Property="TextBlock.FontSize" Value="15" />
            <Setter Property="TextBlock.Padding" Value="5" />
            <Setter Property="TextBlock.Foreground" Value="#666666" />
        </Style>
        <Style x:Key="Label">
            <Setter Property="TextBlock.Padding" Value="5" />
        </Style>
        <Style x:Key="Information">
            <Setter Property="TextBlock.Padding" Value="5" />
            <Setter Property="TextBlock.Foreground" Value="#666666" />
            <Setter Property="TextBlock.TextWrapping" Value="Wrap" />
        </Style>

        <Style TargetType="{x:Type TreeViewItem}">
            <Setter Property="FontWeight" Value="Normal" />
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="FontWeight" Value="Bold" />
                </Trigger>
            </Style.Triggers>
        </Style>

        <HierarchicalDataTemplate x:Key="itemTemplate" ItemsSource="{Binding Children}">
            <StackPanel Orientation="Horizontal">
                <TextBlock Padding="0,2,0,2" Text="{Binding Name}" />
            </StackPanel>
            <HierarchicalDataTemplate.Triggers>
                <DataTrigger Binding="{Binding Hidden}" Value="True">
                    <Setter Property="TreeViewItem.Foreground" Value="#999999" />
                </DataTrigger>
            </HierarchicalDataTemplate.Triggers>
        </HierarchicalDataTemplate>
    </Window.Resources>

    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Close" CanExecute="CommandBinding_CanExecute" Executed="CommandBinding_Executed" />
    </Window.CommandBindings>

    <Window.InputBindings>
        <KeyBinding Key="Escape" Command="ApplicationCommands.Close" />
    </Window.InputBindings>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="63.485" />
            <RowDefinition />
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>

        <Border BorderBrush="#FF57bfcb" BorderThickness="0,0,0,1" Background="#FF57bfcb" Margin="0,0,0,-0.04" Height="67.9">
            <TextBlock Margin="16,16,0,11" Text="Manage Project" TextWrapping="Wrap" FontSize="24" Foreground="#FFFFFFFF"/>
        </Border>

        <Grid Grid.Row="1" Margin="10">
            <DockPanel>
                <TreeView x:Name="manager" BorderBrush="{x:Null}" ItemTemplate="{DynamicResource itemTemplate}" ItemsSource="{Binding Entries}" SelectedItemChanged="manager_SelectedItemChanged" />
            </DockPanel>
        </Grid>

        <Border Grid.Row="2" BorderBrush="#FFB1A6A6" BorderThickness="0,1,0,0" Background="#FFE8EEEF" Padding="5">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,-8,0,-5">
                <Button Width="57.893" Height="25" Margin="5,7.074,0,7.073" Click="Cancel">
                    <TextBlock Text="Cancel" Padding="5,3,5,3" />
                </Button>
                <Button x:Name="hideRemove" Height="25" Margin="5,7.074,3,7.073" Click="HideAndRemove" IsEnabled="False">
                    <TextBlock x:Name="hideRemoveContent" Text="Hide" Padding="5,3,5,3" />
                </Button>
                <Button Width="56.75" Height="25" Margin="5,7.074,3,7.073" Click="Apply">
                    <TextBlock Text="Apply" Padding="5,3,5,3" />
                </Button>
            </StackPanel>
        </Border>
    </Grid>
</Window>
