WorkArea.xaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <UserControl x:Class="PLCIOPointTool.Views.WorkArea"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PLCIOPointTool.Views"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. Width="580" Height="180"
  10. mc:Ignorable="d">
  11. <Grid Background="#FFCECECE" IsEnabled="{Binding IsConnected}">
  12. <Grid.RowDefinitions>
  13. <RowDefinition Height="40"/>
  14. <RowDefinition Height="70"/>
  15. <RowDefinition Height="70"/>
  16. </Grid.RowDefinitions>
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="210"/>
  19. <ColumnDefinition Width="370"/>
  20. </Grid.ColumnDefinitions>
  21. <Label HorizontalAlignment="Center" VerticalAlignment="Center">Symbol Name</Label>
  22. <Label Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center">Operation</Label>
  23. <TextBox Grid.Row="1" Text="{Binding ReadSymbolName}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="30" Width="150"/>
  24. <StackPanel Grid.Row="1" Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  25. <Button Command="{Binding ReadCommand}" Width="50" Height="30">Read</Button>
  26. <Label>-></Label>
  27. <TextBox Text="{Binding ReadValue}" Height="30" Width="100"></TextBox>
  28. <TextBox Text="{Binding ReadValueType}" Height="30" Width="100" Margin="10,0,0,0"></TextBox>
  29. </StackPanel>
  30. <TextBox Grid.Row="2" Text="{Binding WriteSymbolName}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="30" Width="150"/>
  31. <StackPanel Grid.Row="2" Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  32. <ComboBox ItemsSource="{Binding DataTypes}" SelectedIndex="{Binding DataTypeId}" Height="30" Width="100"></ComboBox>
  33. <TextBox Text="{Binding WriteValue}" Height="30" Width="100" Margin="5,0,0,0"></TextBox>
  34. <Label>-></Label>
  35. <Button Command="{Binding WriteCommand}" Width="50" Height="30">Write</Button>
  36. </StackPanel>
  37. </Grid>
  38. </UserControl>