Files
XplorePlane/XplorePlane/Views/ImageProcessing/BgaMeasurePanel.xaml
T

75 lines
3.6 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="240" Height="260"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
Topmost="True"
ShowInTaskbar="False">
<Window.Resources>
<Style x:Key="ToolToggleStyle" TargetType="RadioButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border x:Name="Bd" Background="#EEEEEE" BorderBrush="#CCCCCC"
BorderThickness="1" CornerRadius="3" Padding="14,5" Cursor="Hand">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#0078D7" />
<Setter TargetName="Bd" Property="BorderBrush" Value="#005A9E" />
<Setter Property="Foreground" Value="White" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#DDDDDD" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="Bd" Property="Background" Value="#006CBE" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<StackPanel Margin="10">
<!-- 绘制模式 -->
<TextBlock Text="绘制模式" FontWeight="SemiBold" Margin="0,0,0,4" />
<WrapPanel>
<RadioButton x:Name="RbVoid" Content="画气泡" IsChecked="True" Margin="0,0,6,4"
Style="{StaticResource ToolToggleStyle}" />
<RadioButton x:Name="RbBall" Content="画焊球" Margin="0,0,0,4"
Style="{StaticResource ToolToggleStyle}" />
</WrapPanel>
<TextBlock Text="左键点两次画圆(圆心+半径),右键删除" FontSize="10" Foreground="Gray" Margin="0,2,0,0" />
<Separator Margin="0,8" />
<!-- VoidLimit -->
<TextBlock Text="VoidLimit(%)" Margin="0,0,0,4" />
<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>
<Separator Margin="0,8" />
<!-- 结果 -->
<TextBlock x:Name="TbResult" Text="空隙率: --" FontSize="14" FontWeight="SemiBold" Margin="0,0,0,8" />
<!-- 操作 -->
<WrapPanel HorizontalAlignment="Center">
<Button Content="完成" Padding="14,4" Click="Finish_Click" />
</WrapPanel>
</StackPanel>
</Window>