<Page
    x:Class="BxlUniversalTestAPP.Content.ConnectToPrinter"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BxlUniversalTestAPP.Content"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
           
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>
        
        <TextBlock Text="Connect To Printer" Grid.Row="0" Grid.ColumnSpan="3"/>
        <TextBlock 
        	    HorizontalAlignment="Left" 
        	    Margin="26,60,0,0" 
        	    TextWrapping="Wrap" 
        	    Text="Paired Printer :" 
        	    FontSize="25" 
        	    VerticalAlignment="Top"        	  
        	    Width="200"
                Grid.Row="1"
                Grid.ColumnSpan="2"/>
        <Button x:ConnectionId='1' 
                Name="Search"
                Content="SEARCH" 
                HorizontalAlignment="Stretch" 
                Margin="0,60,25,0" 
                VerticalAlignment="Top" 
                Width="Auto" 
                FontSize="17"
                Grid.Row="1"
                Grid.Column="2"
                                    />
        <ListBox x:ConnectionId='2'
                Name="PairedList"
                HorizontalAlignment="Left" 
                MinHeight="160" 
                Margin="26,15,20,0" 
                VerticalAlignment="Top" 
                Background="#FFC3C3C3"
                                                      
                Grid.Row="2"
                Grid.ColumnSpan="3" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible" VerticalContentAlignment="Top" Height="160" MaxHeight="158">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="0, 2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="250"/>
                            <ColumnDefinition Width="500"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding DisplayName}"/>
                        <TextBlock Grid.Column="1" Text="{Binding HostName}"/>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <TextBlock 
                HorizontalAlignment="Left" 
                Margin="26,12,0,0" 
                TextWrapping="Wrap" 
                Text="Port :" 
                FontSize="25" 
                VerticalAlignment="Top" 
                Grid.Row="3"/>
        <TextBox x:ConnectionId='3' 
                Name="PortName" 
                FontSize="15"
                HorizontalAlignment="Stretch" 
                Margin="0,15,25,5" 
                TextWrapping="Wrap"  
                VerticalAlignment="Top" 
                Width="Auto"
                Grid.Row="3"
                Grid.Column="1"
                Grid.ColumnSpan="2"/>
        <Button x:ConnectionId='4' 
                Name="PortOpen"
                Content="OPEN" 
                FontSize="17"
                HorizontalAlignment="Stretch" 
                Margin="26,15,15,0" 
                VerticalAlignment="Top" 
                Width="Auto" 
                Grid.Row="4"
                Grid.ColumnSpan="2"
                                      />
        <Button x:ConnectionId='5' 
                Name="PortClose"
                Content="CLOSE"  
                FontSize="17"
                HorizontalAlignment="Stretch" 
                Margin="15,15,25,0" 
                VerticalAlignment="Top" 
                Width="Auto" 
                Grid.Row="4"
                Grid.Column="2"
                                       />
    </Grid>
</Page>

