<Window x:Class="SpineViewer.Views.DiagnosticsDialog"
        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:DiagnosticsDialogViewModel}"
        mc:Ignorable="d"
        Title="{DynamicResource Str_Diagnostics}"
        Background="{DynamicResource RegionBrush}"
        Height="450" 
        Width="800"    
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner">
    <Window.DataContext>
        <viewmodels:DiagnosticsDialogViewModel/>
    </Window.DataContext>

    <DockPanel>
        <Border DockPanel.Dock="Bottom" Margin="10">
            <Button Width="120" Content="{DynamicResource Str_CopyDiagnosticsInfo}" Command="{Binding Cmd_CopyToClipboard}"/>
        </Border>

        <Border>
            <Border.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>
            </Border.Resources>
            <ScrollViewer VerticalScrollBarVisibility="Auto">
                <StackPanel Grid.IsSharedSizeScope="True" Margin="30 10">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="CPU"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding CPU, Mode=OneWay}"/>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="GPU"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding GPU, Mode=OneWay}"/>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="Memory"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding Memory, Mode=OneWay}"/>
                    </Grid>

                    <Separator Height="10"/>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="WindowsVersion"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding WindowsVersion, Mode=OneWay}"/>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="DotNetVersion"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding DotNetVersion, Mode=OneWay}"/>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="ProgramVersion"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding ProgramVersion, Mode=OneWay}"/>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="NLogVersion"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding NLogVersion, Mode=OneWay}"/>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="SFMLVersion"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding SFMLVersion, Mode=OneWay}"/>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="FFMpegCoreVersion"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding FFMpegCoreVersion, Mode=OneWay}"/>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="SkiaSharpVersion"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding SkiaSharpVersion, Mode=OneWay}"/>
                    </Grid>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol"/>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Label Content="HandyControlVersion"/>
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="{Binding HandyControlVersion, Mode=OneWay}"/>
                    </Grid>
                </StackPanel>
            </ScrollViewer>
        </Border>
    </DockPanel>
</Window>
