<UserControl x:Class="EquipmentFlyout"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:御魂方案录制宏桌面版"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="250">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <local:EquipmentIcon x:Name="IcoEquipmentType" Width="42" Height="42" Margin="2,2,8,2" Grid.RowSpan="2"/>
            <TextBlock Grid.Column="1" VerticalAlignment="Bottom" Margin="2" HorizontalAlignment="Left">
                <Run x:Name="RunType" Text="雪幽魂"/>+<Run x:Name="RunLevel" Text="1"/>
            </TextBlock>
            <local:CachedJadeControlArray x:Name="ItmJades" JadeCount="6" Grid.Column="1" Grid.Row="1" Margin="2"
                          VerticalAlignment="Top" HorizontalAlignment="Left"/>
            <CheckBox x:Name="ChkLocked" Grid.Column="2" Grid.RowSpan="2" Margin="12,0,0,0"
                      VerticalAlignment="Center" Content="锁"/>
        </Grid>
        <ItemsControl x:Name="ItmProps" Grid.Row="1">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <TextBlock Text="{Binding Name, Mode=OneTime}"/>
                        <local:FormattedTextBlock HorizontalAlignment="Right"
                                                  Value="{Binding Value, Mode=OneTime}"
                                                  Format="{Binding Format}"/>
                    </Grid>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        <Border x:Name="BdrSingleProp" Margin="0,4,0,0" Grid.Row="2"
                Visibility="Collapsed" BorderThickness="0,1,0,0" BorderBrush="Gray">
            <StackPanel>
                <TextBlock Margin="0,4,0,0">
                    固有属性:
                </TextBlock>
                <Grid>
                    <TextBlock x:Name="RunSinglePropName"/>
                    <TextBlock x:Name="RunSinglePropValue" HorizontalAlignment="Right"/>
                </Grid>
            </StackPanel>
        </Border>

        <Border x:Name="BdrSecondaryProps" Grid.Row="3" Margin="0,4,0,0" BorderThickness="0,1,0,0" BorderBrush="Gray">
            <TextBlock Margin="0,4,0,0">副属性收益:</TextBlock>
        </Border>
        <ItemsControl x:Name="ItmPropGrows" Grid.Row="4">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <TextBlock Text="{Binding Name, Mode=OneTime}"/>
                        <local:FormattedTextBlock HorizontalAlignment="Right"
                                                  Value="{Binding Value, Mode=OneTime}"
                                                  Format="{Binding Format}"/>
                    </Grid>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>
</UserControl>
