<Window x:Class="Launcher.Client.Avalonia.GUI.LauncherWindow"
        xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Launcher.Client.Avalonia.GUI"
        Title="Launcher"
        Width="800"
        Height="500"
        MinWidth="800"
        MinHeight="500"
        Background="{DynamicResource MyBackgroundColor}">
    <Grid ColumnDefinitions="5,*,5" RowDefinitions="5,35,5,*,5">
        <Image x:Name="BackgroundImage"
               Grid.RowSpan="5"
               Grid.ColumnSpan="3"
               HorizontalAlignment="Center"
               Stretch="UniformToFill" />

        <Grid x:Name="TopPanelGrid"
              Grid.Row="1"
              Grid.Column="1"
              ColumnDefinitions="*,5,*,5,*,5,*">
            <local:TabButton x:Name="LibraryButton"
                             Grid.Column="0"
                             Classes="MyButtonStyle"
                             Content="Library"
                             FontSize="18" />
            <local:TabButton x:Name="DownloadsButton"
                             Grid.Column="2"
                             Classes="MyButtonStyle"
                             Content="Downloads"
                             FontSize="18" />
            <local:TabButton x:Name="LogButton"
                             Grid.Column="4"
                             Classes="MyButtonStyle"
                             Content="Log"
                             FontSize="18" />
            <local:TabButton x:Name="SettingsButton"
                             Grid.Column="6"
                             Classes="MyButtonStyle"
                             Content="Settings"
                             FontSize="18" />

        </Grid>

        <Grid x:Name="LibraryGrid"
              Grid.Row="3"
              Grid.Column="1"
              ColumnDefinitions="220,5,*,5,220"
              IsVisible="true">
            <ScrollViewer Grid.Column="0"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          Template="{DynamicResource myScrollViewer}"
                          VerticalScrollBarVisibility="Auto">
                <StackPanel x:Name="ProgramsPanel" />
            </ScrollViewer>
            <Grid x:Name="ProgramGrid"
                  Grid.Column="2"
                  RowDefinitions="35,5,35,5,70,5,*">
                <Label x:Name="NameLabel"
                       Grid.Row="0"
                       Classes="MyLabelStyle"
                       Content="name"
                       FontSize="19"
                       FontWeight="Bold" />
                <StackPanel Grid.Row="2"
                            HorizontalAlignment="Right"
                            ClipToBounds="True"
                            Orientation="Horizontal">
                    <Button x:Name="RemoveButton"
                            Width="100"
                            Margin="2,0"
                            Background="{DynamicResource MyRed}"
                            Classes="MyButtonStyle"
                            Content="Remove" />
                    <Button x:Name="InstallButton"
                            Width="100"
                            Margin="2,0"
                            Classes="MyButtonStyle"
                            Content="Install" />
                    <Button x:Name="UpdateButton"
                            Width="100"
                            Margin="2,0"
                            Classes="MyButtonStyle"
                            Content="Update" />
                    <Button x:Name="LaunchButton"
                            Width="100"
                            Margin="2,0"
                            Background="{DynamicResource MyGreen}"
                            Classes="MyButtonStyle"
                            Content="Launch" />
                </StackPanel>
                <TextBox x:Name="DescriptionBox"
                         Grid.Row="4"
                         Classes="MyTextBoxStyle"
                         ScrollViewer.VerticalScrollBarVisibility="Auto" />
                <TextBox x:Name="ProgramLogBox"
                         Grid.Row="6"
                         Classes="MyTextBoxStyle"
                         ScrollViewer.VerticalScrollBarVisibility="Auto" />
            </Grid>
            <Grid Grid.Row="0"
                  Grid.Column="4"
                  RowDefinitions="95,*">
                <Grid Grid.Row="0"
                      ColumnDefinitions="*,*"
                      RowDefinitions="30,30,30">

                    <Label Grid.Row="0"
                           Grid.Column="0"
                           Classes="MyLabelStyle"
                           Content="version:" />
                    <ComboBox Grid.Row="0"
                              Grid.Column="1"
                              Background="{DynamicResource MyDarkTr}"
                              Template="{DynamicResource MyComboBox}">
                        <ComboBoxItem IsSelected="True">
                            <Label Background="Transparent"
                                   Classes="MyLabelStyle"
                                   Content="v1" />
                        </ComboBoxItem>
                    </ComboBox>
                    <Label Grid.Row="1"
                           Grid.Column="0"
                           Classes="MyLabelStyle"
                           Content="directory:" />
                    <Label Name="ProgramDirectoryLabel"
                           Grid.Row="1"
                           Grid.Column="1"
                           Classes="MyLabelStyle"
                           Content="0" />
                    <Label Grid.Row="2"
                           Grid.Column="0"
                           Classes="MyLabelStyle"
                           Content="size:" />
                    <Label Name="ProgramSizeLabel"
                           Grid.Row="2"
                           Grid.Column="1"
                           Classes="MyLabelStyle"
                           Content="0" />
                </Grid>
                <ScrollViewer Name="ProgramSettingsViever"
                              Grid.Row="1"
                              HorizontalAlignment="Stretch"
                              VerticalAlignment="Stretch"
                              VerticalContentAlignment="Top"
                              Template="{DynamicResource myScrollViewer}" />
            </Grid>
        </Grid>


        <Grid x:Name="DownloadsGrid"
              Grid.Row="3"
              Grid.Column="1"
              IsVisible="false" />

        <Grid x:Name="LogGrid"
              Grid.Row="3"
              Grid.Column="1"
              IsVisible="false"
              RowDefinitions="30,*">
            <Label x:Name="LogfileLabel"
                   Grid.Row="0"
                   Grid.Column="0"
                   Classes="MyLabelStyle"
                   Content="logfile"
                   FontStyle="Italic" />
            <TextBox x:Name="LogBox"
                     Grid.Row="1"
                     Grid.Column="0"
                     Classes="MyTextBoxStyle"
                     ScrollViewer.VerticalScrollBarVisibility="Auto" />
        </Grid>

        <Grid x:Name="SettingsGrid"
              Grid.Row="3"
              Grid.Column="1"
              IsVisible="false" />
    </Grid>
</Window>