NS_KetRight.xaml
5.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<UserControl x:Class="SmartScan.SetControl.WPF.NS_KetRight"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SmartScan.SetControl.WPF"
mc:Ignorable="d" MinHeight="400" Height="Auto"
Background="#121212">
<UserControl.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#E6E6E6"/>
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
</Style>
<Style TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="#E6E6E6"/>
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
</Style>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#252525"/>
<Setter Property="Foreground" Value="#E6E6E6"/>
<Setter Property="BorderBrush" Value="#3F3F3F"/>
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
</Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="#0078D7"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
<Setter Property="Padding" Value="10,5"/>
</Style>
</UserControl.Resources>
<Grid>
<!-- 内容区域 -->
<StackPanel>
<!-- 标题栏保持不变 -->
<Border Background="#0078D7" Height="40">
<TextBlock Text="元件信息"
Name="Wpf_right_name"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="White"
FontSize="14" FontFamily="微软雅黑"
FontWeight="Bold"/>
</Border>
<!-- 字段区域添加单独的滚动条,并限制最大高度 -->
<ScrollViewer VerticalScrollBarVisibility="Auto" MaxHeight="450">
<StackPanel x:Name="FieldsPanel" Margin="10,10,10,0">
<!-- 动态生成的字段会被添加到这里 -->
</StackPanel>
</ScrollViewer>
<!-- 按钮和识别结果区域保持在滚动区域外,确保始终可见 -->
<StackPanel Margin="10,0,10,10">
<!-- 操作按钮区域 -->
<StackPanel Name="ButtonsPanel" Margin="0,10,0,10">
<!-- 按钮会被添加到这里 -->
</StackPanel>
<!-- 识别结果区域 -->
<StackPanel Name="ResultPanel" Margin="0,10,0,0" Background="{x:Null}">
<Border Background="{x:Null}" CornerRadius="3">
<StackPanel>
<StackPanel x:Name="ResultItemsPanel">
<!-- 识别结果项目会被动态添加到这里 -->
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
<!-- 分割线 -->
<Separator Background="#3F3F3F" Height="1" Margin="0,5,0,15"/>
<!-- 图例说明 -->
<StackPanel>
<Grid Margin="0,5,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Rectangle Width="16" Height="16" Fill="#4CAF50" RadiusX="2" RadiusY="2"/>
<TextBlock Grid.Column="1" x:Name="lbl_Green" Text="绿色 - 完全正确" FontSize="14" FontFamily="微软雅黑" VerticalAlignment="Center" Margin="10,0,0,0"/>
</Grid>
<Grid Margin="0,5,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Rectangle Width="16" Height="16" Fill="#FFC107" RadiusX="2" RadiusY="2"/>
<TextBlock Grid.Column="1" x:Name="lbl_yellow" Text="黄色 - OCR识别结果,需要验证" FontSize="14" FontFamily="微软雅黑" VerticalAlignment="Center" Margin="10,0,0,0"/>
</Grid>
<Grid Margin="0,5,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Rectangle Width="16" Height="16" Fill="#F44336" RadiusX="2" RadiusY="2"/>
<TextBlock Grid.Column="1" x:Name="lbl_red" Text="红色 - 无法识别或有问题" FontSize="14" FontFamily="微软雅黑" VerticalAlignment="Center" Margin="10,0,0,0"/>
</Grid>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>