Files
XplorePlane/XplorePlane/Views/ImageProcessing/BgaMeasurePanel.xaml
T
2026-04-29 10:55:49 +08:00

96 lines
4.9 KiB
XML

<Window
x:Class="XplorePlane.Views.ImageProcessing.BgaMeasurePanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BGA空隙测量"
Width="280" Height="280"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
Topmost="True" ShowInTaskbar="False"
Background="#F5F5F5" FontFamily="Microsoft YaHei UI">
<Window.Resources>
<Style x:Key="IconBtnStyle" TargetType="ButtonBase">
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ButtonBase">
<Border x:Name="Bd" Background="#FFFFFF" BorderBrush="#E0E0E0"
BorderThickness="1" CornerRadius="6" Padding="10,6">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#EAF2FB" />
<Setter TargetName="Bd" Property="BorderBrush" Value="#B0D4F1" />
</Trigger>
<DataTrigger Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}}" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#005FB8" />
<Setter TargetName="Bd" Property="BorderBrush" Value="#004C99" />
<Setter Property="Foreground" Value="White" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CardStyle" TargetType="Border">
<Setter Property="Background" Value="White" />
<Setter Property="BorderBrush" Value="#E8E8E8" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="Padding" Value="12,10" />
<Setter Property="Margin" Value="0,0,0,8" />
</Style>
<Style x:Key="ParamLabel" TargetType="TextBlock">
<Setter Property="FontSize" Value="11" />
<Setter Property="Foreground" Value="#555" />
<Setter Property="Margin" Value="0,0,0,3" />
</Style>
<Style TargetType="TextBox">
<Setter Property="BorderBrush" Value="#D0D0D0" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="4,3" />
<Setter Property="FontSize" Value="11.5" />
<Style.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="4" />
</Style>
</Style.Resources>
</Style>
</Window.Resources>
<StackPanel Margin="10">
<!-- 工具栏 -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<RadioButton x:Name="RbVoid" IsChecked="True" Style="{StaticResource IconBtnStyle}" ToolTip="画气泡" Margin="0,0,4,0">
<Image Source="/Assets/Icons/bubble.png" Width="20" Height="20" />
</RadioButton>
<RadioButton x:Name="RbBall" Style="{StaticResource IconBtnStyle}" ToolTip="画焊球" Margin="0,0,10,0">
<TextBlock Text="焊球" FontSize="11" VerticalAlignment="Center" />
</RadioButton>
<Button Style="{StaticResource IconBtnStyle}" ToolTip="完成" Click="Finish_Click">
<Image Source="/Assets/Icons/ok.png" Width="20" Height="20" />
</Button>
</StackPanel>
<!-- 提示 -->
<TextBlock Text="左键点两次画圆(圆心+半径),右键删除" FontSize="10" Foreground="#999" Margin="0,0,0,8" />
<!-- 参数卡片 -->
<Border Style="{StaticResource CardStyle}">
<StackPanel>
<TextBlock Text="VoidLimit(%)" Style="{StaticResource ParamLabel}" />
<DockPanel>
<TextBox x:Name="TbVoidLimit" DockPanel.Dock="Right" Width="50" Text="25.0"
VerticalContentAlignment="Center" Margin="6,0,0,0" />
<Slider x:Name="SliderVoidLimit" Minimum="0" Maximum="100" Value="25"
VerticalAlignment="Center" />
</DockPanel>
</StackPanel>
</Border>
<!-- 结果卡片 -->
<Border Style="{StaticResource CardStyle}">
<TextBlock x:Name="TbResult" Text="空隙率: --" FontSize="13" FontWeight="SemiBold" Foreground="#333" />
</Border>
</StackPanel>
</Window>