<UserControl x:Class="PLCIOPointTool.Views.WorkArea"
             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:PLCIOPointTool.Views"
             xmlns:prism="http://prismlibrary.com/"
             prism:ViewModelLocator.AutoWireViewModel="True"
             Width="580" Height="180"
             mc:Ignorable="d">
    <Grid Background="#FFCECECE" IsEnabled="{Binding IsConnected}">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="70"/>
            <RowDefinition Height="70"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="210"/>
            <ColumnDefinition Width="370"/>
        </Grid.ColumnDefinitions>

        <Label HorizontalAlignment="Center" VerticalAlignment="Center">Symbol Name</Label>
        <Label Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center">Operation</Label>

        <TextBox Grid.Row="1" Text="{Binding ReadSymbolName}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="30" Width="150"/>
        <StackPanel Grid.Row="1" Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Button Command="{Binding ReadCommand}" Width="50" Height="30">Read</Button>
            <Label>-></Label>
            <TextBox Text="{Binding ReadValue}" Height="30" Width="100"></TextBox>
            <TextBox Text="{Binding ReadValueType}" Height="30" Width="100" Margin="10,0,0,0"></TextBox>
        </StackPanel>

        <TextBox Grid.Row="2" Text="{Binding WriteSymbolName}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="30" Width="150"/>
        <StackPanel Grid.Row="2" Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
            <ComboBox ItemsSource="{Binding DataTypes}" SelectedIndex="{Binding DataTypeId}" Height="30" Width="100"></ComboBox>
            <TextBox Text="{Binding WriteValue}" Height="30" Width="100" Margin="5,0,0,0"></TextBox>
            <Label>-></Label>
            <Button Command="{Binding WriteCommand}" Width="50" Height="30">Write</Button>
        </StackPanel>
    </Grid>
</UserControl>
