<Window x:Class="RealPlayDemo.LoginWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="{StaticResource ID_LOGIN}" Height="300" Width="300" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize">
    <!--Layout about LoginWindow--> 
    <Grid >
        <Border BorderBrush="Gray" BorderThickness="1" Margin="5">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="50" />
                </Grid.RowDefinitions>
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0" Grid.Column="0">
                        <TextBlock Text="{StaticResource ID_IP}" Margin="0,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                    </Grid>
                    <Grid Grid.Row="1" Grid.Column="0">
                        <TextBlock Text="{StaticResource ID_PORT}" Margin="0,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                    </Grid>
                    <Grid Grid.Row="2" Grid.Column="0">
                        <TextBlock Text="{StaticResource ID_USERNAME}" Margin="0,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                    </Grid>
                    <Grid Grid.Row="3" Grid.Column="0">
                        <TextBlock Text="{StaticResource ID_PASSWORD}" Margin="0,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                    </Grid>
                    <Grid Grid.Row="0" Grid.Column="1">
                        <TextBox x:Name="ip" Height="25" Width="180" Margin="2,0,0,0" Text="171.35.0.140"/>
                    </Grid>
                    <Grid Grid.Row="1" Grid.Column="1">
                        <TextBox x:Name="port" Height="25" Width="180" Margin="2,0,0,0" Text="37777" PreviewTextInput="port_input"/>
                    </Grid>
                    <Grid Grid.Row="2" Grid.Column="1">
                        <TextBox x:Name="username" Height="25" Width="180" Margin="2,0,0,0" Text="admin" />
                    </Grid>
                    <Grid Grid.Row="3" Grid.Column="1">
                        <PasswordBox x:Name="password" Height="25" Width="180" Margin="2,0,0,0" Password="admin" />
                    </Grid>
                </Grid>
                <Grid Grid.Row="1">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                        <Button Content="{StaticResource ID_OK}"  Height="30" Width="120" Click="ok_Clicked"/>
                    </StackPanel>
                </Grid>
            </Grid>
        </Border>
    </Grid>
</Window>
