气泡测量面板:工具选择改为按钮样式单选,选中蓝色高亮
This commit is contained in:
@@ -3,19 +3,54 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Title="气泡测量工具"
|
Title="气泡测量工具"
|
||||||
Width="260" Height="320"
|
Width="260" Height="340"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
Topmost="True"
|
Topmost="True"
|
||||||
ShowInTaskbar="False">
|
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="10,4" 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">
|
<StackPanel Margin="10">
|
||||||
<!-- 工具选择 -->
|
<!-- 工具选择 -->
|
||||||
<TextBlock Text="工具" FontWeight="SemiBold" Margin="0,0,0,4" />
|
<TextBlock Text="工具" FontWeight="SemiBold" Margin="0,0,0,4" />
|
||||||
<WrapPanel>
|
<WrapPanel>
|
||||||
<RadioButton x:Name="RbRoi" Content="ROI" IsChecked="True" Margin="0,0,12,4" />
|
<RadioButton x:Name="RbRoi" Content="ROI" IsChecked="True" Margin="0,0,4,4"
|
||||||
<RadioButton x:Name="RbWand" Content="魔棒" Margin="0,0,12,4" />
|
Style="{StaticResource ToolToggleStyle}" />
|
||||||
<RadioButton x:Name="RbBrush" Content="画笔" Margin="0,0,12,4" />
|
<RadioButton x:Name="RbWand" Content="魔棒" Margin="0,0,4,4"
|
||||||
<RadioButton x:Name="RbEraser" Content="橡皮擦" Margin="0,0,0,4" />
|
Style="{StaticResource ToolToggleStyle}" />
|
||||||
|
<RadioButton x:Name="RbBrush" Content="画笔" Margin="0,0,4,4"
|
||||||
|
Style="{StaticResource ToolToggleStyle}" />
|
||||||
|
<RadioButton x:Name="RbEraser" Content="橡皮擦" Margin="0,0,0,4"
|
||||||
|
Style="{StaticResource ToolToggleStyle}" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
|
|
||||||
<Separator Margin="0,6" />
|
<Separator Margin="0,6" />
|
||||||
|
|||||||
Reference in New Issue
Block a user