<Window x:Class="SpineViewer.Views.AboutDialog"
        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:SpineViewer.Views"
        xmlns:viewmodels="clr-namespace:SpineViewer.ViewModels"
        d:DataContext="{d:DesignInstance Type=viewmodels:AboutDialogViewModel}"
        mc:Ignorable="d"
        Title="{DynamicResource Str_Abount}"
        Background="{DynamicResource RegionBrush}"
        Height="300"
        Width="500"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner">
    <Window.DataContext>
        <viewmodels:AboutDialogViewModel/>
    </Window.DataContext>

    <Grid Margin="30">
        <Grid.Resources>
            <Style TargetType="{x:Type Label}" BasedOn="{StaticResource LabelDefault}">
                <Setter Property="HorizontalAlignment" Value="Stretch"/>
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
            </Style>
            <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource TextBoxBaseStyle}">
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
            </Style>
        </Grid.Resources>

        <StackPanel Grid.IsSharedSizeScope="True">
            <!-- 程序版本 -->
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Label Content="{DynamicResource Str_ProgremVersion}"/>
                <Label Grid.Column="1" Content="{Binding ProgramVersion}"/>
            </Grid>

            <!-- 项目地址 -->
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Label Content="{DynamicResource Str_ProjectUrl}"/>
                <Label Grid.Column="1">
                    <Hyperlink NavigateUri="{Binding ProjectUrl}" Command="{Binding Cmd_OpenProjectUrl}">
                        <Run Text="{Binding ProjectUrl, Mode=OneWay}"/>
                    </Hyperlink>
                </Label>
            </Grid>
        </StackPanel>
    </Grid>
</Window>
