<Window x:Class="EEMSCenterUI.Views.MainWindow"
        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:EEMSCenterUI"
        xmlns:prism="http://prismlibrary.com/"
        prism:ViewModelLocator.AutoWireViewModel="True"
        mc:Ignorable="d"
        WindowStyle="None" 
        WindowChrome.WindowChrome="{DynamicResource WindowChromeKey}"
        Title="MainWindow" Height="450" Width="800">
    <Window.Resources>
        <WindowChrome x:Key="WindowChromeKey">
            <WindowChrome.CaptionHeight>0</WindowChrome.CaptionHeight>
        </WindowChrome>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Border x:Name="Bor" Background="{StaticResource LightThemeColor}" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
            <Grid >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="4"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="4"/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>
                <Image Source="/Logo.ico" Margin="4" Height="20"></Image>
                <TextBlock Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">EEMS Server</TextBlock>

                <Button Grid.Column="4" Background="Transparent" BorderThickness="0" Width="40" Click="Hide_Click">
                    <Image Source="{StaticResource Icon_Expander}" Height="20"/>
                </Button>
                <Button Grid.Column="6" Background="Transparent" BorderThickness="0" Width="40" Click="Exit_Click">
                    <Image Source="{StaticResource Icon_Exit}" Height="20"/>
                </Button>
            </Grid>
        </Border>

        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel>
                <TextBox Text="{Binding Server.IP}"/>
                <TextBox Text="{Binding Server.Port}"/>
                <Button Command="{Binding StartServiceCommand}">Start Service</Button>
                <TextBox Text="{Binding GUID}"/>
                <Button Command="{Binding RequestFileCommand}">Request File</Button>
            </StackPanel>

            <ItemsControl ItemsSource="{Binding Clients}" Grid.Row="2">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Value.IP}"/>
                            <TextBlock Margin="16,0" Text="{Binding Value.Port}"/>
                            <TextBlock Text="{Binding Value.Hub}"/>
                        </StackPanel>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </Grid>
    </Grid>
</Window>
