<UserControl x:Class="HeBianGu.App.Disk.View.Loyout.HomeControl"
             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:h="https://github.com/HeBianGu"
             xmlns:local="clr-namespace:HeBianGu.App.Disk.View.Loyout"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:system="clr-namespace:System;assembly=mscorlib"
             d:DesignHeight="450"
             d:DesignWidth="800"
             mc:Ignorable="d">
    <Grid>
        <Grid.Resources>
            <Style BasedOn="{StaticResource {x:Static h:ButtonKeys.Dynamic}}" TargetType="Button">
                <Setter Property="Margin" Value="0,2,20,2" />
                <Setter Property="RenderTransform" Value="{StaticResource {x:Static h:SystemKeys.TransformGroup}}" />
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="170" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <ListBox h:Cattach.ItemHorizontalAlignment="Stretch"
                 h:Cattach.ItemHorizontalContentAlignment="Left"
                 BorderBrush="{DynamicResource {x:Static h:BrushKeys.BorderBrushTitle}}"
                 BorderThickness="0,0,1,0"
                 IsSynchronizedWithCurrentItem="true"
                 ItemContainerStyle="{StaticResource {x:Static h:ListBoxItemKeys.LeftAccent}}"
                 ItemsSource="{Binding LinkActions}"
                 SelectedIndex="0"
                 SelectedItem="{Binding SelectLink, Mode=TwoWay}">
            <ListBox.Resources>
                <DataTemplate DataType="{x:Type h:LinkAction}">
                    <Grid Height="{DynamicResource {x:Static h:SystemKeys.ItemHeight}}">
                        <StackPanel Margin="15,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
                            <TextBlock Style="{DynamicResource {x:Static h:TextBlockKeys.Icon}}" Text="{Binding Logo}" />
                            <TextBlock Margin="10,0,0,0" VerticalAlignment="Center" Text="{Binding DisplayName}" />
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </ListBox.Resources>

            <ListBox.Template>
                <ControlTemplate TargetType="ListBox">
                    <Grid>
                        <Border Background="{DynamicResource {x:Static h:BrushKeys.Dark0_3}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                        <ItemsPresenter SnapsToDevicePixels="True" />
                    </Grid>
                </ControlTemplate>
            </ListBox.Template>
        </ListBox>

        <StackPanel Margin="10" VerticalAlignment="Bottom">
            <!--<ProgressBar Value="1507" Maximum="2056" Style="{DynamicResource }"/>-->
            <h:FProgressBar Height="12" Maximum="2056" Value="850">
                <!--<h:FProgressBar.Triggers>
                    <EventTrigger RoutedEvent="Loaded">
                        <BeginStoryboard Storyboard="{StaticResource S.Storyboard.ProgressBar.LoadValue}" />
                    </EventTrigger>
                </h:FProgressBar.Triggers>-->
            </h:FProgressBar>

            <TextBlock Margin="0,10"
                       HorizontalAlignment="Left"
                       Foreground="{DynamicResource {x:Static h:BrushKeys.ForegroundTitle}}"
                       Style="{DynamicResource {x:Static h:TextBlockKeys.Default}}"
                       Text="850G/2056G" />
        </StackPanel>
        <!--  中间内容  -->
        <Grid Grid.Column="1" Margin="0">
            <h:LinkActionFrame LinkAction="{Binding SelectLink, Mode=TwoWay}" />
        </Grid>
    </Grid>
</UserControl>
