ConnectionSelectorView.xaml 4.1 KB
<!--
 /***********************************************
 * CONFIDENTIAL AND PROPRIETARY 
 * 
 * The source code and other information contained herein is the confidential and exclusive property of
 * ZIH Corp. and is subject to the terms and conditions in your end user license agreement.
 * This source code, and any other information contained herein, shall not be copied, reproduced, published, 
 * displayed or distributed, in whole or in part, in any medium, by any means, for any purpose except as
 * expressly permitted under such license agreement.
 * 
 * Copyright ZIH Corp. 2018
 * 
 * ALL RIGHTS RESERVED
 ***********************************************/
-->

<UserControl x:Class="Zebra.Windows.DevDemo.UserControls.ConnectionSelectorView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Zebra.Windows.DevDemo.UserControls"
             xmlns:utils="clr-namespace:Zebra.Windows.DevDemo.Utils"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.DataContext>
        <local:ConnectionSelectorViewModel />
    </UserControl.DataContext>
    <UserControl.Resources>
        <utils:ConnectionTypeDescriptionValueConverter x:Key="converter" />
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <TextBlock Margin="0,0,10,10" VerticalAlignment="Center">Connection Type:</TextBlock>
        <ComboBox x:Name="connectionTypesDropdown" ItemsSource="{Binding ConnectionTypes}" Width="100" Grid.Column="1" Margin="0,0,0,10" HorizontalAlignment="Left" VerticalAlignment="Center" SelectionChanged="ConnectionTypesDropdown_SelectionChanged">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <ContentPresenter Content="{Binding Converter={StaticResource converter}}" />
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>

        <TextBlock x:Name="usbPrintersLabel" Grid.Row="1" Margin="0,0,10,0" VerticalAlignment="Center">USB Printers:</TextBlock>
        <ComboBox x:Name="usbPrintersDropdown" ItemsSource="{Binding UsbDevices}" Width="180" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" />

        <TextBlock x:Name="usbDirectLabel" Grid.Row="1" Margin="0,0,10,0" VerticalAlignment="Center">Symbolic Name:</TextBlock>
        <TextBox x:Name="usbDirectInput" Width="180" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding SymbolicName}" />

        <TextBlock x:Name="ipAddressLabel" Grid.Row="1" Margin="0,0,10,10" VerticalAlignment="Center">IP Address:</TextBlock>
        <TextBox x:Name="ipAddressInput" Style="{StaticResource ZebraTextInput}" Width="180" Grid.Row="1" Grid.Column="1" Margin="0,0,0,10" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding IpAddress}" />

        <TextBlock x:Name="btAddressLabel" Grid.Row="1" Margin="0,0,10,10" VerticalAlignment="Center">Bluetooth Address:</TextBlock>
        <TextBox x:Name="btAddressInput" Style="{StaticResource ZebraTextInput}" Width="180" Grid.Row="1" Grid.Column="1" Margin="0,0,0,10" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding MacAddress}" />

        <TextBlock x:Name="portLabel" Grid.Row="2" Margin="0,0,10,0" VerticalAlignment="Center">Port:</TextBlock>
        <TextBox x:Name="portInput" Style="{StaticResource ZebraTextInput}" Width="60" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding Port}" />
    </Grid>
</UserControl>