<ext:BorderlessWindow x:Class="HomeWindow"
        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:local="clr-namespace:御魂方案录制宏桌面版"
        AllowsTransparency="True" WindowStyle="None"
        MinHeight="350" MinWidth="500"
        xmlns:ext="clr-namespace:Nukepayload2.UI.Xaml;assembly=Nukepayload2.UI.Win32"
        mc:Ignorable="d" BorderBrush="DodgerBlue" BorderThickness="1"
        Title="御魂方案录制宏桌面版" Height="450" Width="625">
    <ext:BorderlessWindow.Resources>
        <Style x:Key="AccentColorButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="FocusVisualStyle">
                <Setter.Value>
                    <Style>
                        <Setter Property="Control.Template">
                            <Setter.Value>
                                <ControlTemplate>
                                    <Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </Setter.Value>
            </Setter>
            <Setter Property="Background" Value="#FFDDDDDD"/>
            <Setter Property="BorderBrush" Value="#FF707070"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
                            <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsDefaulted" Value="True">
                                <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Background" TargetName="border" Value="DarkBlue"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="#FF3C7FB1"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter Property="Background" TargetName="border" Value="Black"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="#FF2C628B"/>
                            </Trigger>
                            <Trigger Property="ToggleButton.IsChecked" Value="True">
                                <Setter Property="Background" TargetName="border" Value="Black"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Background" TargetName="border" Value="#FFF4F4F4"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="#FFADB2B5"/>
                                <Setter Property="Foreground" Value="#FF838383"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </ext:BorderlessWindow.Resources>
    <Grid>
        <Grid.Resources>
            <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="pack://application:,,,/Nukepayload2.UI.Win32;component/Themes/Generic.xaml"/>
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" MinWidth="200"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="TitleBar" Grid.ColumnSpan="2" VerticalAlignment="Top" Panel.ZIndex="1">
            <Rectangle x:Name="TitleBarDragElement" Fill="Transparent"/>
            <TextBlock Margin="8" IsHitTestVisible="False" Foreground="White">御魂方案宏录制工具</TextBlock>
            <Button x:Name="BtnAbout" HorizontalAlignment="Right" 
                    Background="DodgerBlue" Foreground="White" 
                    BorderThickness="0" Margin="0,0,48,0" 
                    Style="{StaticResource AccentColorButtonStyle}"
                    VerticalAlignment="Top" Padding="18,4">关于</Button>
            <Button Click="BtnClose_Click" Style="{StaticResource CloseButtonStyle}"/>
        </Grid>
        <Grid x:Name="ClientAreaMaster" 
              Background="DodgerBlue" 
              TextElement.Foreground="White">
            <Grid.RowDefinitions>
                <RowDefinition Height="32"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="1" FontSize="20" Margin="8,0">打开</TextBlock>
            <ScrollViewer HorizontalScrollBarVisibility="Disabled"
                          VerticalScrollBarVisibility="Auto" Grid.Row="2">
                <ItemsControl x:Name="LstRecentFiles">

                </ItemsControl>
            </ScrollViewer>
            <ProgressBar x:Name="PrgLoadRecent" Height="6" Foreground="White" Background="Transparent" 
                         BorderThickness="0" Grid.Row="2" Margin="4,0" 
                         IsIndeterminate="True" VerticalAlignment="Center"/>
            <TextBlock x:Name="TblRecentHere" Grid.Row="2" Margin="8,4" VerticalAlignment="Top">
                最近的文件将显示在这里
            </TextBlock>
            <Button x:Name="BtnBrowse" Grid.Row="3" Margin="8,4" Padding="24,8"
                    Background="DodgerBlue" Foreground="White" BorderThickness="2"
                    BorderBrush="LightBlue" Style="{DynamicResource AccentColorButtonStyle}">
                浏览文件...
            </Button>
        </Grid>
        <Grid x:Name="ClientAreaDetail" Grid.Column="1">
            <StackPanel Margin="8">
                <TextBlock FontSize="20">新建</TextBlock>
                <Button x:Name="BtnAddEmptyMacro" BorderThickness="2" BorderBrush="LightGray" 
                        HorizontalAlignment="Left" Padding="32"
                        Margin="0,4">空白宏</Button>
                <TextBlock FontSize="20">快速入门</TextBlock>
                <TextBlock Margin="0,4" TextWrapping="Wrap">录制你的第一个御魂清理方案，然后与别人的方案比比看谁的更适合自己的账号。</TextBlock>
            </StackPanel>
        </Grid>
    </Grid>
</ext:BorderlessWindow>