通用工业视觉软件设计之通讯设备配置-FrmCommunication-2

<!--发送和接受数据-->
<Border Grid.Column="1" Background="White" Margin="1">
<Grid Margin="2">
<Grid.RowDefinitions>
<RowDefinition Height="32"/>
<RowDefinition Height="60"/>
<RowDefinition Height="32"/>
<RowDefinition Height="60"/>
<RowDefinition Height="36"/>
<RowDefinition />
</Grid.RowDefinitions>
<!--发送数据-->
<StackPanel Grid.Row="0" Orientation="Horizontal">
<Label Content="发送数据" FontSize="13" VerticalContentAlignment="Center"/>
<CheckBox
x:Name="chk_Send"
Content="16进制发送"
FontSize="13"
VerticalContentAlignment="Center"
IsChecked="{Binding SendByHex}"
Command="{Binding SendByHexCom}"
CommandParameter="{Binding ElementName=chk_Send}"/>
</StackPanel>
<!--类型-->
<StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right">
<Label
Content="{Binding SelectProName,Mode=TwoWay}"
VerticalContentAlignment="Center" HorizontalAlignment="Left"/>
</StackPanel>
<TextBox Grid.Row="1" FontSize="13"
TextWrapping="Wrap" Text="{Binding SendMeg}"
VerticalScrollBarVisibility="Hidden"
HorizontalScrollBarVisibility="Auto"/>
<!--接收数据-->
<StackPanel Grid.Row="2" Orientation="Horizontal">
<Label Content="接收数据" FontSize="13" VerticalContentAlignment="Center"/>
<CheckBox Content="16进制接收"
x:Name="chk_Receive"
FontSize="13"
HorizontalAlignment="Center"
IsChecked="{Binding ReceivedByHex}"
VerticalContentAlignment="Center"
Command="{Binding ReceivedByHexCom}"
CommandParameter="{Binding ElementName=chk_Receive}"/>
</StackPanel>
<!--按钮-->
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
<local:CustButton
HorizontalAlignment="Right"
Background="Transparent"
Margin=" 10 0 10 0"
Width="80" Height="28"
FontSize="13"
Foreground="White"
Content="发送"
Command="{Binding Send_Mess_Commun}"
CommandParameter="{Binding ElementName=FrmCommun}"/>
<local:CustButton
HorizontalAlignment="Right"
Background="Transparent"
Margin=" 10 0 10 0"
Width="80" Height="28"
FontSize="13"
Foreground="White"
Content="清空"
Command="{Binding EmptySendData}"
CommandParameter="{Binding ElementName=FrmCommun}"/>
</StackPanel>
<!--接收数据内容-->
<TextBox Grid.Row="3" FontSize="13"
TextWrapping="Wrap" Text="{Binding ReceiveMeg}"
IsReadOnly="True"
VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Auto"/>
<!--按钮-->
<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Right">
<local:CustButton
HorizontalAlignment="Right"
Background="Transparent"
Margin=" 10 0 10 0"
Width="80" Height="28"
FontSize="13"
Foreground="White"
Content="清空"
Command="{Binding EmptyReceiveData}"
CommandParameter="{Binding ElementName=FrmCommun}"/>
</StackPanel>
<!--参数设置-->
<Border Grid.Row="7">
<ContentControl x:Name="Page_Change" HorizontalAlignment="Stretch"/>
</Border>
</Grid>
</Border>