Files
CapMachine/CapMachine.Wpf/Views/ZlgCanDriveConfigView.xaml
2026-02-06 12:34:34 +08:00

843 lines
41 KiB
XML

<UserControl
x:Class="CapMachine.Wpf.Views.ZlgCanDriveConfigView"
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:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
xmlns:localEx="clr-namespace:CapMachine.Wpf"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
d:DesignHeight="980"
d:DesignWidth="1920"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d">
<UserControl.Resources>
<localEx:BindingProxy x:Key="Proxy" Data="{Binding}" />
</UserControl.Resources>
<Grid>
<Grid.Resources>
<Style
x:Key="TextBoxStyle"
BasedOn="{StaticResource MaterialDesignTextBoxBase}"
TargetType="TextBox">
<Setter Property="FontSize" Value="18" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="10,0" />
<Setter Property="Width" Value="80" />
</Style>
<Style x:Key="TextBlockStyle" TargetType="TextBlock">
<Setter Property="Width" Value="110" />
<Setter Property="FontSize" Value="18" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="5,0" />
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6*" />
<ColumnDefinition Width="6*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition />
</Grid.RowDefinitions>
<materialDesign:Card
Margin="3"
Background="{DynamicResource MaterialDesignLightBackground}"
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
UniformCornerRadius="5">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="10,0,0,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="20"
Text="&#xe9f8;" />
<TextBlock
Margin="5,0"
VerticalAlignment="Center"
FontSize="20"
FontWeight="Bold"
Text="{Binding DbcPathTitle}" />
<Border
Width="550"
Margin="5,8"
Padding="15,5"
Background="LightGray"
CornerRadius="5">
<TextBlock
HorizontalAlignment="Right"
VerticalAlignment="Center"
FontSize="20"
Text="{Binding CurrentDbcPath}" />
</Border>
<Button Command="{Binding LoadDbcCmd}" Foreground="White">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe771; " />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="选择Dbc文件" />
</StackPanel>
</Button>
</StackPanel>
</materialDesign:Card>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<materialDesign:Card
Grid.Column="0"
Margin="3"
Background="{DynamicResource MaterialDesignLightBackground}"
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
UniformCornerRadius="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock
Margin="10,0"
VerticalAlignment="Center"
FontSize="18"
FontWeight="Bold"
Text="配置程序" />
<StackPanel Grid.Row="1" Orientation="Horizontal">
<StackPanel.Resources>
<Style
x:Key="btnStyle"
BasedOn="{StaticResource MaterialDesignFlatSecondaryLightBgButton}"
TargetType="Button">
<Setter Property="Margin" Value="5,2" />
<Setter Property="Foreground" Value="White" />
</Style>
</StackPanel.Resources>
<Button
Command="{Binding CanLinConfigProCmd}"
CommandParameter="Add"
Style="{StaticResource btnStyle}">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe8c0;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="新建" />
</StackPanel>
</Button>
<Button
Command="{Binding CanLinConfigProCmd}"
CommandParameter="Edit"
Style="{StaticResource btnStyle}">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe73a;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="修改" />
</StackPanel>
</Button>
<Button
Command="{Binding CanLinConfigProCmd}"
CommandParameter="Delete"
Style="{StaticResource btnStyle}">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe748;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="删除" />
</StackPanel>
</Button>
<Button
Command="{Binding CanLinConfigProCmd}"
CommandParameter="Active"
Style="{StaticResource btnStyle}">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe8fa;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="激活" />
</StackPanel>
</Button>
</StackPanel>
<DataGrid
x:Name="CanConfigDatagrid"
Grid.Row="2"
AutoGenerateColumns="False"
BorderBrush="Gray"
BorderThickness="1"
CanUserAddRows="False"
HeadersVisibility="Column"
IsEnabled="{Binding IsCANConfigDatagridActive}"
IsReadOnly="True"
ItemsSource="{Binding ListCanLinConfigPro}"
SelectedItem="{Binding SelectCanLinConfigPro, Mode=TwoWay}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<prism:InvokeCommandAction Command="{Binding CanConfigProGridSelectionChangedCmd}" CommandParameter="{Binding ElementName=CanConfigDatagrid, Path=SelectedItem}" />
</i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown">
<prism:InvokeCommandAction Command="{Binding CanConfigProGridPreviewMouseLeftButtonDownCmd}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<DataGrid.Columns>
<DataGridTextColumn
Width="*"
Binding="{Binding ConfigName}"
Header="名称" />
<DataGridTextColumn
Width="80"
Binding="{Binding CANLINInfo}"
Header="模式" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</materialDesign:Card>
<materialDesign:Card
Grid.Column="1"
Margin="3"
Background="{DynamicResource MaterialDesignLightBackground}"
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
UniformCornerRadius="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="60" />
<RowDefinition Height="40" />
<RowDefinition Height="200" />
<RowDefinition Height="40" />
<RowDefinition Height="400" />
<RowDefinition Height="40" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock
Margin="10,0"
VerticalAlignment="Center"
FontSize="18"
FontWeight="Bold"
Text="参数操作" />
<StackPanel
Grid.Row="1"
Margin="0,0,15,0"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Margin="5,0"
Command="{Binding CanOpCmd}"
CommandParameter="Open"
Foreground="White">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe743;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="{Binding ConnectButtonText}" />
</StackPanel>
</Button>
<Button
Margin="5,0"
Command="{Binding CanOpCmd}"
CommandParameter="Close"
Foreground="White">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe7fb;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="{Binding CloseButtonText}" />
</StackPanel>
</Button>
<Button
Margin="5,0"
Command="{Binding CanOpCmd}"
CommandParameter="Parse"
Foreground="White">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe93f;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="解析DBC" />
</StackPanel>
</Button>
<Button
Margin="5,0"
Command="{Binding CanOpCmd}"
CommandParameter="Save"
Foreground="White">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe936;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="保存配置" />
</StackPanel>
</Button>
</StackPanel>
<TextBlock
Grid.Row="2"
Margin="10,0"
VerticalAlignment="Center"
FontSize="18"
FontWeight="Bold"
Text="状态和模式" />
<Grid Grid.Row="3">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="10,0,2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="20"
Text="&#xe977;" />
<TextBlock
Width="80"
Style="{StaticResource TextBlockStyle}"
Text="报文状态:" />
<Border
Width="50"
Margin="0,12"
BorderThickness="1"
CornerRadius="5">
<Border.Style>
<Style TargetType="Border">
<Setter Property="Background" Value="Gray" />
<Style.Triggers>
<DataTrigger Binding="{Binding ZlgCanDriveService.IsSendOk}" Value="true">
<Setter Property="Background" Value="LimeGreen" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="White"
Text="发送" />
</Border>
<Border
Width="50"
Margin="2,12"
BorderThickness="1"
CornerRadius="5">
<Border.Style>
<Style TargetType="Border">
<Setter Property="Background" Value="Gray" />
<Style.Triggers>
<DataTrigger Binding="{Binding ZlgCanDriveService.IsReviceOk}" Value="true">
<Setter Property="Background" Value="LimeGreen" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="White"
Text="接收" />
</Border>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<TextBlock
Margin="10,0,2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="20"
Text="&#xe796;" />
<TextBlock
Width="90"
Style="{StaticResource TextBlockStyle}"
Text="启用调度表:" />
<ToggleButton
Width="40"
Margin="2,2"
Command="{Binding SchEnableCmd}"
IsChecked="{Binding CurrentSchEnable, Mode=TwoWay}"
Style="{StaticResource MaterialDesignSwitchToggleButton}"
ToolTip="启用调度表" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBlock
Margin="10,0,2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe8fa;" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="CAN连接状态" />
<Border
Width="50"
Margin="5,10"
Padding="5"
CornerRadius="3">
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<DataTrigger Binding="{Binding ZlgCanDriveService.OpenState}" Value="True">
<Setter Property="Background" Value="LimeGreen" />
</DataTrigger>
<DataTrigger Binding="{Binding ZlgCanDriveService.OpenState}" Value="False">
<Setter Property="Background" Value="Gray" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="White"
Text="连接" />
</Border>
</StackPanel>
<StackPanel
Grid.Row="1"
Grid.Column="1"
Orientation="Horizontal">
<TextBlock
Margin="10,0,2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="20"
Text="&#xe796;" />
<TextBlock
Width="90"
Style="{StaticResource TextBlockStyle}"
Text="CAN/FD:" />
<ComboBox
Width="110"
Margin="5,0"
SelectedValue="{Binding SelectedModeKey, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Tag">
<ComboBoxItem Content="CAN" Tag="Can" />
<ComboBoxItem Content="CANFD" Tag="CanFd" />
</ComboBox>
</StackPanel>
<StackPanel
Grid.Row="2"
Grid.Column="0"
Orientation="Horizontal">
<Button
Margin="15,0,5,0"
Command="{Binding CanOpCmd}"
CommandParameter="CycleSend">
<Button.Style>
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
<Style.Triggers>
<DataTrigger Binding="{Binding ZlgCanDriveService.IsCycleSend}" Value="true">
<Setter Property="Background" Value="LimeGreen" />
<Setter Property="Foreground" Value="White" />
</DataTrigger>
<DataTrigger Binding="{Binding ZlgCanDriveService.IsCycleSend}" Value="false">
<Setter Property="Background" Value="Gray" />
<Setter Property="Foreground" Value="White" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe796;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="循环发送" />
</StackPanel>
</Button>
<Button
Margin="5,0"
Command="{Binding CanOpCmd}"
CommandParameter="CycleRecive">
<Button.Style>
<Style BasedOn="{StaticResource MaterialDesignFlatDarkBgButton}" TargetType="Button">
<Style.Triggers>
<DataTrigger Binding="{Binding ZlgCanDriveService.IsCycleRevice}" Value="true">
<Setter Property="Background" Value="LimeGreen" />
<Setter Property="Foreground" Value="White" />
</DataTrigger>
<DataTrigger Binding="{Binding ZlgCanDriveService.IsCycleRevice}" Value="false">
<Setter Property="Background" Value="Gray" />
<Setter Property="Foreground" Value="White" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe73a;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="循环接收" />
</StackPanel>
</Button>
</StackPanel>
</Grid>
<TextBlock
Grid.Row="4"
Margin="10,0"
VerticalAlignment="Center"
FontSize="18"
FontWeight="Bold"
Text="参数信息" />
<Grid Grid.Row="5">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="10,0,10,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe9f8;" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding BaudRateTitle}" />
<ComboBox
Width="100"
DisplayMemberPath="Text"
FontSize="16"
ItemsSource="{Binding ArbBaudRateCbxItems}"
SelectedValue="{Binding CurrentArbBaudRate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Key" />
<!--<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding SelectedCANConfigExdDto.DataBaudRate}" />-->
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<TextBlock
Margin="10,0,10,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe9f8;" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="{Binding DataBaudRateTitle}" />
<ComboBox
Width="100"
DisplayMemberPath="Text"
FontSize="16"
IsEnabled="{Binding IsCanFdMode}"
ItemsSource="{Binding DataBaudRateCbxItems}"
SelectedValue="{Binding CurrentDataBaudRate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Key" />
<!--<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding SelectedCANConfigExdDto.ArbBaudRate}" />-->
</StackPanel>
<StackPanel
Grid.Row="1"
Grid.Column="1"
Orientation="Horizontal">
<TextBlock
Margin="10,0,10,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe9f8;" />
<TextBlock
Width="auto"
Style="{StaticResource TextBlockStyle}"
Text="ISO标准" />
<ToggleButton
Width="50"
Margin="5,0,5,0"
IsChecked="{Binding CurrentISOEnable, Mode=TwoWay}"
IsEnabled="{Binding IsCanFdMode}"
Style="{StaticResource MaterialDesignSwitchToggleButton}"
ToolTip="{Binding Name}" />
</StackPanel>
<StackPanel
Grid.Row="2"
Grid.Column="1"
Orientation="Horizontal">
<TextBlock
Margin="10,0,10,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe9f8;" />
<TextBlock
Width="auto"
Style="{StaticResource TextBlockStyle}"
Text="终端电阻" />
<ToggleButton
Width="50"
Margin="5,0,5,0"
IsChecked="{Binding CurrentResEnable, Mode=TwoWay}"
IsEnabled="{Binding IsCanFdMode}"
Style="{StaticResource MaterialDesignSwitchToggleButton}"
ToolTip="{Binding Name}" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBlock
Margin="10,0,10,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe9f8;" />
<TextBlock Style="{StaticResource TextBlockStyle}" Text="循环周期(ms)" />
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding CurrentCycle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
</Grid>
<TextBlock
Grid.Row="6"
Margin="10,0"
VerticalAlignment="Center"
FontSize="18"
FontWeight="Bold"
Text="写入读取操作" />
<Grid Grid.Row="7">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel
Margin="0,0,15,0"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Margin="5,0"
Command="{Binding WriteReadConfigCmd}"
CommandParameter="OpenDialog"
Foreground="White"
IsEnabled="{Binding IsRwEditable}">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe796;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="读写设置" />
</StackPanel>
</Button>
<Button
Margin="15,0,0,0"
Command="{Binding ScheduleConfigCmd}"
Foreground="White">
<StackPanel Orientation="Horizontal">
<TextBlock
Margin="2,0"
VerticalAlignment="Center"
FontFamily="/Assets/Fonts/#iconfont"
FontSize="18"
Text="&#xe796;" />
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="调度表" />
</StackPanel>
</Button>
</StackPanel>
<TextBlock
Grid.Row="1"
Margin="10"
VerticalAlignment="Center"
FontSize="16"
Text="提示:点击【读写设置】在弹窗中统一管理写入/读取配置(含规则与默认值)。"
TextWrapping="Wrap" />
</Grid>
</Grid>
</materialDesign:Card>
</Grid>
<materialDesign:Card
Grid.RowSpan="2"
Grid.Column="1"
Margin="3"
Background="{DynamicResource MaterialDesignLightBackground}"
Foreground="{DynamicResource PrimaryHueLightForegroundBrush}"
UniformCornerRadius="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock
Margin="10,0"
VerticalAlignment="Center"
FontSize="18"
FontWeight="Bold"
Text="信号" />
<DataGrid
Grid.Row="1"
AutoGenerateColumns="False"
CanUserAddRows="False"
HeadersVisibility="Column"
IsReadOnly="True"
ItemsSource="{Binding ListCanDbcModel}"
SelectedItem="{Binding SelectedCanDbcModel, Mode=TwoWay}">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Triggers>
<DataTrigger Binding="{Binding IsSeletedInfo}" Value="1">
<Setter Property="Background" Value="LightGreen" />
</DataTrigger>
<DataTrigger Binding="{Binding IsSeletedInfo}" Value="2">
<Setter Property="Background" Value="SkyBlue" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTextColumn Width="120" Binding="{Binding MsgId}">
<DataGridTextColumn.Header>
<TextBlock FontWeight="Bold" Text="消息ID" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Width="200" Binding="{Binding MsgName}">
<DataGridTextColumn.Header>
<TextBlock FontWeight="Bold" Text="消息名称" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Width="140" Binding="{Binding Name}">
<DataGridTextColumn.Header>
<TextBlock FontWeight="Bold" Text="中文名称" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Width="*" Binding="{Binding SignalName}">
<DataGridTextColumn.Header>
<TextBlock FontWeight="Bold" Text="信号名称" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Width="90" Binding="{Binding SignalUnit}">
<DataGridTextColumn.Header>
<TextBlock FontWeight="Bold" Text="单位" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTextColumn Width="150" Binding="{Binding SignalRtValue}">
<DataGridTextColumn.Header>
<TextBlock FontWeight="Bold" Text="实时值" />
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</materialDesign:Card>
</Grid>
</UserControl>