|
- <UserControl
- x:Class="BPASmartClient.FoodStationTest.View.PlcVarMonitorView"
- 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:vm="clr-namespace:BPASmartClient.FoodStationTest.ViewModel"
- d:DesignHeight="1080"
- d:DesignWidth="1920"
- mc:Ignorable="d">
- <UserControl.DataContext>
- <vm:PlcVarMonitorViewModel />
- </UserControl.DataContext>
- <Border BorderBrush="{StaticResource bordColor}" BorderThickness="0">
- <Grid Margin="0,10">
- <Grid.RowDefinitions>
- <RowDefinition Height="60" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*" />
- <ColumnDefinition Width="8*" />
- <ColumnDefinition Width="4*" />
- <ColumnDefinition Width="4*" />
- <ColumnDefinition Width="8*" />
- <ColumnDefinition Width="5*" />
- <ColumnDefinition Width="17" />
- </Grid.ColumnDefinitions>
- <Grid>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="32"
- Foreground="Aqua"
- Text="序号" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,1,0,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="1">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="32"
- Foreground="Aqua"
- Text="名称" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,1,0,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="2">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="32"
- Foreground="Aqua"
- Text="地址" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,1,0,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="3">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="32"
- Foreground="Aqua"
- Text="类型" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,1,0,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="4">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="32"
- Foreground="Aqua"
- Text="描述" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,1,0,0"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="5">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="32"
- Foreground="Aqua"
- Text="当前值" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,1,0,0"
- Cursor="SizeWE" />
- </Grid>
- </Grid>
- <Grid Grid.Row="1">
- <ScrollViewer>
- <ItemsControl Foreground="Aqua" ItemsSource="{Binding plcInfos}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*" />
- <ColumnDefinition Width="8*" />
- <ColumnDefinition Width="4*" />
- <ColumnDefinition Width="4*" />
- <ColumnDefinition Width="8*" />
- <ColumnDefinition Width="5*" />
- </Grid.ColumnDefinitions>
- <Grid>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding Count}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="1">
- <TextBlock
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding Name}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="2">
- <TextBlock
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding Address}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="3">
- <TextBlock
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding Type}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="4">
- <TextBlock
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding Describe}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1"
- Cursor="SizeWE" />
- </Grid>
- <Grid Grid.Column="5">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding Value}" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1"
- Cursor="SizeWE" />
- </Grid>
- </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>
- </Border>
- </UserControl>
|