<Page
    x:Class="TestApp.MainPage"
    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"
    mc:Ignorable="d">
    <Grid Margin="20,20,20,20">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="1" Background="Black">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="200,0,0,0">
                <TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Right">Baud Rate:</TextBlock>
                <ComboBox x:ConnectionId='0' x:Name="cbBaudRate" Margin="8" Width="115" SelectedIndex="6"                                               >
                    <ComboBoxItem Content="110" />
                    <ComboBoxItem Content="300" />
                    <ComboBoxItem Content="600" />
                    <ComboBoxItem Content="1200" />
                    <ComboBoxItem Content="2400" />
                    <ComboBoxItem Content="4800" />
                    <ComboBoxItem Content="9600" />
                    <ComboBoxItem Content="14400" />
                    <ComboBoxItem Content="19200" />
                    <ComboBoxItem Content="38400" />
                    <ComboBoxItem Content="56000" />
                    <ComboBoxItem Content="57600" />
                    <ComboBoxItem Content="115200" />
                    <ComboBoxItem Content="128000" />
                    <ComboBoxItem Content="256000" />
                    <ComboBoxItem Content="750000" />
                    <ComboBoxItem Content="921600" />
                    <ComboBoxItem Content="1000000" />
                    <ComboBoxItem Content="2000000" />
                    <ComboBoxItem Content="3000000" />
                    <ComboBoxItem Content="6000000" />
                    <ComboBoxItem Content="12000000" />
                </ComboBox>
                <TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Right">Flow Control:</TextBlock>
                <ComboBox x:ConnectionId='0' x:Name="cbFlowControl" Margin="8" Width="120" SelectedIndex="1"                                                  >
                    <ComboBoxItem Content="None" Tag="NONE" />
                    <ComboBoxItem Content="RTS/CTS" Tag="RTS_CTS" />
                    <ComboBoxItem Content="XOn XOff" Tag="XON_XOFF"/>
                    <ComboBoxItem Content="DTR/DSR" Tag="DTR_DSR"/>
                </ComboBox>
                <TextBlock Foreground="#FF6BA4D6" VerticalAlignment="Center" HorizontalAlignment="Right" Visibility="Collapsed">XOn Char:</TextBlock>
                <TextBox Margin="8" Visibility="Collapsed"></TextBox>
                <TextBlock Foreground="#FF6BA4D6" VerticalAlignment="Center" HorizontalAlignment="Right" Visibility="Collapsed">XOff Char:</TextBlock>
                <TextBox Margin="8" Visibility="Collapsed"></TextBox>
                <TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Right">Parity:</TextBlock>
                <ComboBox x:ConnectionId='0' x:Name="cbParity" Margin="8" Width="100" SelectedIndex="0"                                             >
                    <ComboBoxItem Content="None" Tag="NONE" />
                    <ComboBoxItem Content="Even" Tag="EVEN"/>
                    <ComboBoxItem Content="Odd" Tag="ODD"/>
                    <ComboBoxItem Content="Mark" Tag="MARK"/>
                    <ComboBoxItem Content="Space" Tag="SPACE"/>
                </ComboBox>
                <TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Right">Stop Bits:</TextBlock>
                <ComboBox x:ConnectionId='0' x:Name="cbStopBits" Margin="8" Width="60" SelectedIndex="0"                                               >
                    <ComboBoxItem Content="1" Tag="BITS_1"/>
                    <ComboBoxItem Content="2" Tag="BITS_2"/>
                </ComboBox>
                <TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Right">Data Bits:</TextBlock>
                <ComboBox x:ConnectionId='0' x:Name="cbDataBits" Margin="8" Width="60" SelectedIndex="1"                                               >
                    <ComboBoxItem Content="7" Tag="BITS_7"/>
                    <ComboBoxItem Content="8" Tag="BITS_8"/>
                </ComboBox>
            </StackPanel>
            <TextBox Grid.Column="0" Grid.Row="2" IsReadOnly="False"  Name="txtConsole" Height="450" TextWrapping="Wrap" ScrollViewer.VerticalScrollBarVisibility="Visible" Background="Black" Foreground="Lime" AcceptsReturn="True" VerticalAlignment="Top"/>
        </Grid>
        <StackPanel Grid.Column="0" Background="Black">
            <Button x:ConnectionId='0' x:Name="btnStartDevice"  Content="Start Device"                              HorizontalAlignment="Stretch" Margin="0,0,39,0"/>
            <Button x:ConnectionId='0' x:Name="btnReadEEPROM" Content="Read EEPROM"                             />
            <Button x:ConnectionId='0' x:Name="btnProgramEEPROM" Content="Program EEPROM"                                />
            <Button x:ConnectionId='0' x:Name="btnPurgeTest" Content="Purge Test" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"                           />

            

            <Button x:ConnectionId='0' x:Name="btnOpen" Content="Open" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"                       />
            <Button x:ConnectionId='0' x:Name="btnClose" Content="Close" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"                        />
            <Button x:ConnectionId='0' x:Name="btnRead" Content="Read" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"                       />
            <Button x:ConnectionId='0' x:Name="btnWrite" Content="Write" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"                        />
            <Button x:ConnectionId='0' x:Name="btnTest" Content="Test" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"                      />
        </StackPanel>
    </Grid>
</Page>

