<UserControl x:Class="SimpleStm.Views.SettingsPage"
             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:SimpleStm.Views"
             xmlns:prism="http://prismlibrary.com/"
             prism:ViewModelLocator.AutoWireViewModel="True"  
             mc:Ignorable="d" 
             
             
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <TextBlock HorizontalAlignment="Center"
                   VerticalAlignment="Top"
                   Text="Communication Settings"
                   TextWrapping="Wrap" />

        <TextBlock Margin="255,110,0,0"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Text="BaudRate"
                   TextWrapping="Wrap"/>
        
        <ComboBox Name="Baudratecombo"           
            Margin="255,130,0,0"
            Width="80"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            
            IsEditable="true"
            IsReadOnly="true"
            SelectedItem="{Binding Path=BaudRate}" ItemsSource="{Binding Path=Baudrates,
            Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
        </ComboBox>

        <TextBlock Margin="150,110,0,0"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Text="COM Port"
                   TextWrapping="Wrap"/>
        
        <ComboBox Name="Comportcombo"           
            Margin="150,130,0,0"
            Width="80"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            
            IsEditable="true"
            IsReadOnly="true"
            SelectedItem="{Binding Path=ComPort}" ItemsSource="{Binding Path=Comports,
            Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
        </ComboBox>

        <TextBlock Margin="360,110,0,0"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Text="Parity"
                   TextWrapping="Wrap"/>
        
        <ComboBox Name="Paritycombo"           
            Margin="360,130,0,0"
            Width="80"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            
            IsEditable="true"
            IsReadOnly="true"
            SelectedItem="{Binding Path=Parityy}" ItemsSource="{Binding Path=Paritys,
            Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
        </ComboBox>

        <TextBlock Margin="465,110,0,0"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Text="Databits"
                   TextWrapping="Wrap"/>
        
        <ComboBox Name="Databitscombo"           
            Margin="465,130,0,0"
            Width="80"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            
            IsEditable="true"
            IsReadOnly="true"
            SelectedItem="{Binding Path=DataBits}" ItemsSource="{Binding Path=Databits,
            Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
        </ComboBox>

        <TextBlock Margin="570,110,0,0"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Text="Stopbits"
                   TextWrapping="Wrap"/>
        
        <ComboBox Name="Stopbitscombo"           
            Margin="570,130,0,0"
            Width="80"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            
            IsEditable="true"
            IsReadOnly="true"
            SelectedItem="{Binding Path=StopBits}" ItemsSource="{Binding Path=Stopbits,
            Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
        </ComboBox>

        <Button Width="90"
                Height="28"
                Margin="285,200,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Command="{Binding ConnectCommand,
                                  Mode=OneWay}"
                Content="Connect" />
        <Button Width="90"
                Height="28"
                Margin="425,200,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Command="{Binding DisconnectCommand,
                                  Mode=OneWay}"
                Content="Disconnect" />





    </Grid>
</UserControl>


