|
- <UserControl
- x:Class="BPASmartClient.JXJFoodBigStation.View.GlobalVarMonitorView"
- 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
- d:DesignHeight="1080"
- d:DesignWidth="1920"
- mc:Ignorable="d">
- <UserControl.DataContext>
- <vm:GlobalVarMonitorViewModel />
- </UserControl.DataContext>
-
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="80" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <!--#region 表格标题栏设置-->
-
- <Grid
- Grid.Row="0"
- Margin="0,10,0,0"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="60" />
- <ColumnDefinition Width="400" />
- <ColumnDefinition Width="200" />
- <ColumnDefinition />
- <ColumnDefinition Width="200" />
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="Aqua"
- Text="序号" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="Aqua"
- Text="变量名" />
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="Aqua"
- Text="类型" />
- <Grid Grid.Column="3">
- <TextBlock
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="Aqua"
- Text="描述" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <TextBlock
- Grid.Column="4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="24"
- Foreground="Aqua"
- Text="当前值" />
-
- <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
- </Grid>
- <Grid Grid.Row="1">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl Foreground="Aqua" ItemsSource="{Binding PlcInfo}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr" Margin="0,3">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="60" />
- <ColumnDefinition Width="400" />
- <ColumnDefinition Width="200" />
- <ColumnDefinition />
- <ColumnDefinition Width="200" />
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding SerialNum}" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="1">
- <TextBlock
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding Variable}" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding Type}" />
- <Grid Grid.Column="3">
- <TextBlock
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding Describe}" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding NowValue}" />
-
-
- <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,1" />
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </Grid>
- </UserControl>
|