#0030 优化图像处理窗体页面布局,简洁清晰

This commit is contained in:
zhengxuan.zhang
2026-03-16 17:12:25 +08:00
parent 06cc42ff33
commit 140153d449
4 changed files with 253 additions and 234 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ namespace XplorePlane
protected override Window CreateShell() protected override Window CreateShell()
{ {
return Container.Resolve<MainWindow>(); return Container.Resolve<MainWindowB>();
} }
protected override void RegisterTypes(IContainerRegistry containerRegistry) protected override void RegisterTypes(IContainerRegistry containerRegistry)
@@ -1,57 +1,55 @@
<UserControl x:Class="XplorePlane.Views.ImageProcessingPanelView" <UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x:Class="XplorePlane.Views.ImageProcessingPanelView"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:controls="clr-namespace:ImageProcessing.Controls;assembly=ImageProcessing.Controls"
xmlns:controls="clr-namespace:ImageProcessing.Controls;assembly=ImageProcessing.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:roi="clr-namespace:ImageROIControl.Controls;assembly=ImageROIControl" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" xmlns:roi="clr-namespace:ImageROIControl.Controls;assembly=ImageROIControl"
d:DesignHeight="700" d:DesignWidth="1000"> d:DesignHeight="700"
d:DesignWidth="1000"
mc:Ignorable="d">
<UserControl.Resources> <UserControl.Resources>
<!-- 颜色 --> <SolidColorBrush x:Key="PanelBg" Color="White" />
<SolidColorBrush x:Key="PanelBg" Color="White" /> <SolidColorBrush x:Key="PanelBorder" Color="#cdcbcb" />
<SolidColorBrush x:Key="PanelBorder" Color="#cdcbcb" /> <SolidColorBrush x:Key="SeparatorBrush" Color="#E0E0E0" />
<SolidColorBrush x:Key="SeparatorBrush" Color="#E0E0E0" /> <SolidColorBrush x:Key="StatusBarBg" Color="#F5F5F5" />
<SolidColorBrush x:Key="StatusBarBg" Color="#F5F5F5" /> <SolidColorBrush x:Key="BtnDefaultFg" Color="#1c1c1b" />
<SolidColorBrush x:Key="BtnDefaultFg" Color="#1c1c1b" /> <SolidColorBrush x:Key="BtnHoverFg" Color="#1c3866" />
<SolidColorBrush x:Key="BtnHoverFg" Color="#1c3866" /> <SolidColorBrush x:Key="BtnDisabledFg" Color="#cdcbcb" />
<SolidColorBrush x:Key="BtnDisabledFg" Color="#cdcbcb" />
<!-- 字体 -->
<FontFamily x:Key="CsdFont">Microsoft YaHei UI</FontFamily> <FontFamily x:Key="CsdFont">Microsoft YaHei UI</FontFamily>
<!-- 侧边面板 Border 样式(白底、圆角、细边框) -->
<Style x:Key="PanelBorderStyle" TargetType="Border"> <Style x:Key="PanelBorderStyle" TargetType="Border">
<Setter Property="Background" Value="{StaticResource PanelBg}" /> <Setter Property="Background" Value="{StaticResource PanelBg}" />
<Setter Property="BorderBrush" Value="{StaticResource PanelBorder}" /> <Setter Property="BorderBrush" Value="{StaticResource PanelBorder}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="4" /> <Setter Property="CornerRadius" Value="4" />
</Style> </Style>
<!-- 菜单按钮样式:无边框白底,hover 变深蓝文字 -->
<Style x:Key="MenuBtn" TargetType="Button"> <Style x:Key="MenuBtn" TargetType="Button">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<Border Background="White" Height="{TemplateBinding Height}"> <Border Height="{TemplateBinding Height}" Background="White">
<ContentPresenter x:Name="cp" <ContentPresenter
HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="cp"
HorizontalAlignment="Center"
VerticalAlignment="Center"
TextBlock.FontFamily="{StaticResource CsdFont}"
TextBlock.FontSize="15" TextBlock.FontSize="15"
TextBlock.FontWeight="Bold" TextBlock.FontWeight="Bold"
TextBlock.FontFamily="{StaticResource CsdFont}"
TextBlock.Foreground="{StaticResource BtnDefaultFg}" /> TextBlock.Foreground="{StaticResource BtnDefaultFg}" />
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter TargetName="cp" Property="TextBlock.Foreground" <Setter TargetName="cp" Property="TextBlock.Foreground" Value="{StaticResource BtnHoverFg}" />
Value="{StaticResource BtnHoverFg}" />
</Trigger> </Trigger>
<Trigger Property="IsEnabled" Value="False"> <Trigger Property="IsEnabled" Value="False">
<Setter TargetName="cp" Property="TextBlock.Foreground" <Setter TargetName="cp" Property="TextBlock.Foreground" Value="{StaticResource BtnDisabledFg}" />
Value="{StaticResource BtnDisabledFg}" />
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
@@ -59,14 +57,13 @@
</Setter> </Setter>
</Style> </Style>
<!-- GroupBox 标题样式 -->
<Style TargetType="GroupBox"> <Style TargetType="GroupBox">
<Setter Property="FontFamily" Value="{StaticResource CsdFont}" /> <Setter Property="FontFamily" Value="{StaticResource CsdFont}" />
<Setter Property="FontSize" Value="12" /> <Setter Property="FontSize" Value="12" />
<Setter Property="FontWeight" Value="Bold" /> <Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="#1c1c1b" /> <Setter Property="Foreground" Value="#1c1c1b" />
<Setter Property="BorderBrush" Value="#cdcbcb" /> <Setter Property="BorderBrush" Value="#cdcbcb" />
<Setter Property="Padding" Value="4,6,4,4" /> <Setter Property="Padding" Value="4,6,4,4" />
</Style> </Style>
</UserControl.Resources> </UserControl.Resources>
@@ -77,99 +74,97 @@
<RowDefinition Height="36" /> <RowDefinition Height="36" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- ═══════════════════════════════════════════════════ <!-- 主内容区:左侧操作栏 | 中间图像 | 右侧参数配置 -->
主内容区:左侧操作栏 | 中间图像 | 右侧参数配置
═══════════════════════════════════════════════════ -->
<Grid Grid.Row="0" Margin="5"> <Grid Grid.Row="0" Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="160" MinWidth="140" MaxWidth="200" /> <ColumnDefinition
<ColumnDefinition Width="5" /> Width="160"
<ColumnDefinition Width="*" MinWidth="300" /> MinWidth="140"
<ColumnDefinition Width="5" /> MaxWidth="200" />
<ColumnDefinition Width="320" MinWidth="280" MaxWidth="420" />
<ColumnDefinition Width="*" MinWidth="300" />
<ColumnDefinition
Width="320"
MinWidth="280"
MaxWidth="420" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- ── 左侧操作栏 ── --> <!-- 左侧操作栏 -->
<Border Grid.Column="0" Style="{StaticResource PanelBorderStyle}" Margin="0,0,0,0"> <Border Grid.Column="0" Style="{StaticResource PanelBorderStyle}">
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel> <StackPanel>
<Button
Height="70"
Command="{Binding LoadImageCommand}"
Content="加载图像"
Style="{StaticResource MenuBtn}" />
<Rectangle Height="1" Fill="{StaticResource SeparatorBrush}" /> <Rectangle Height="1" Fill="{StaticResource SeparatorBrush}" />
<Button Content="加载图像" Height="70" <Button
Style="{StaticResource MenuBtn}" Height="70"
Command="{Binding LoadImageCommand}" /> Command="{Binding ApplyProcessingCommand}"
Content="处理图像"
Style="{StaticResource MenuBtn}" />
<Rectangle Height="1" Fill="{StaticResource SeparatorBrush}" /> <Rectangle Height="1" Fill="{StaticResource SeparatorBrush}" />
<Button Content="处理图像" Height="70" <Button
Style="{StaticResource MenuBtn}" Height="70"
Command="{Binding ApplyProcessingCommand}" /> Command="{Binding ResetImageCommand}"
<Rectangle Height="1" Fill="{StaticResource SeparatorBrush}" /> Content="重置图像"
<Button Content="重置图像" Height="70" Style="{StaticResource MenuBtn}" />
Style="{StaticResource MenuBtn}"
Command="{Binding ResetImageCommand}" />
<Rectangle Height="1" Fill="{StaticResource SeparatorBrush}" />
<Button Content="保存结果" Height="70"
Style="{StaticResource MenuBtn}"
Command="{Binding SaveResultCommand}" />
<Rectangle Height="1" Fill="{StaticResource SeparatorBrush}" /> <Rectangle Height="1" Fill="{StaticResource SeparatorBrush}" />
<Button
Height="70"
Command="{Binding SaveResultCommand}"
Content="保存结果"
Style="{StaticResource MenuBtn}" />
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
</Border> </Border>
<!-- GridSplitter 1 --> <!-- 中间:原始图像 + 处理结果 -->
<GridSplitter Grid.Column="1" Width="5" <Grid Grid.Column="1">
HorizontalAlignment="Stretch"
Background="{StaticResource SeparatorBrush}" />
<!-- ── 中间:原始图像 + 处理结果 ── -->
<Grid Grid.Column="2">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*" /> <RowDefinition Height="8*" />
<RowDefinition Height="*" /> <RowDefinition Height="18*" />
<RowDefinition Height="301*" />
<RowDefinition Height="327*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<GroupBox Header="原始图像" Grid.Row="0" Margin="0,0,0,3"> <GroupBox
<Border BorderBrush="LightGray" BorderThickness="1" Background="Black"> Grid.Row="0"
<roi:PolygonRoiCanvas Grid.RowSpan="3"
ImageSource="{Binding OriginalImage}" /> Margin="0,0,0,3"
</Border> Header="原始图像">
<roi:PolygonRoiCanvas Background="Black" ImageSource="{Binding OriginalImage}" />
</GroupBox> </GroupBox>
<GroupBox Header="处理结果" Grid.Row="1" Margin="0,3,0,0"> <GroupBox Grid.Row="3" Header="处理结果">
<Border BorderBrush="LightGray" BorderThickness="1" Background="Black"> <roi:PolygonRoiCanvas Background="Black" ImageSource="{Binding CurrentImage}" />
<roi:PolygonRoiCanvas
ImageSource="{Binding CurrentImage}" />
</Border>
</GroupBox> </GroupBox>
</Grid> </Grid>
<!-- GridSplitter 2 --> <!-- 右侧:算子选择 + 参数配置 -->
<GridSplitter Grid.Column="3" Width="5" <Border Grid.Column="3" Style="{StaticResource PanelBorderStyle}">
HorizontalAlignment="Stretch" <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
Background="{StaticResource SeparatorBrush}" />
<!-- ── 右侧:算子选择 + 参数配置 ── -->
<Border Grid.Column="4" Style="{StaticResource PanelBorderStyle}" Margin="0,0,0,0">
<ScrollViewer VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
VerticalAlignment="Top">
<StackPanel Margin="10,8,10,10"> <StackPanel Margin="10,8,10,10">
<GroupBox Header="选择算子" Margin="0,0,0,8"> <GroupBox Margin="0,0,0,8" Header="选择算子">
<ComboBox x:Name="cmbProcessors" <ComboBox
Height="30" Margin="4,4,4,4" x:Name="cmbProcessors"
VerticalContentAlignment="Center" Height="30"
Padding="6,0,0,0" Padding="6,0,0,0"
FontFamily="{StaticResource CsdFont}" VerticalContentAlignment="Center"
FontSize="12" FontFamily="{StaticResource CsdFont}"
ItemsSource="{Binding AvailableProcessors}" FontSize="12"
SelectedItem="{Binding SelectedProcessorItem}" ItemsSource="{Binding AvailableProcessors}"
SelectionChanged="OnProcessorComboChanged" /> SelectedItem="{Binding SelectedProcessorItem}"
SelectionChanged="OnProcessorComboChanged" />
</GroupBox> </GroupBox>
<GroupBox Header="参数配置" Margin="0,0,0,0"> <GroupBox Header="参数配置">
<controls:ProcessorParameterControl <controls:ProcessorParameterControl
x:Name="parameterControl" x:Name="parameterControl"
MinHeight="200" MinHeight="200"
Margin="4,4,4,4"
ParameterChanged="OnParameterChanged" /> ParameterChanged="OnParameterChanged" />
</GroupBox> </GroupBox>
@@ -178,40 +173,36 @@
</Border> </Border>
</Grid> </Grid>
<!-- ═══════════════════════════════════════════════════ <!-- 状态栏 -->
状态栏 <Border
═══════════════════════════════════════════════════ --> Grid.Row="1"
<Border Grid.Row="1" Padding="12,0"
Background="{StaticResource StatusBarBg}" Background="{StaticResource StatusBarBg}"
BorderBrush="{StaticResource PanelBorder}" BorderBrush="{StaticResource PanelBorder}"
BorderThickness="0,1,0,0" BorderThickness="0,1,0,0">
Padding="12,0">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="180" /> <ColumnDefinition Width="180" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center"> <TextBlock
<TextBlock Text="状态:" Grid.Column="0"
FontFamily="{StaticResource CsdFont}" VerticalAlignment="Center"
FontWeight="Bold" FontFamily="{StaticResource CsdFont}"
FontSize="12" FontSize="12"
Foreground="#333333" /> Foreground="#333333">
<TextBlock Text="{Binding StatusMessage}" <Run FontWeight="Bold" Text="状态:" /><Run Text="{Binding StatusMessage}" />
FontFamily="{StaticResource CsdFont}" </TextBlock>
FontSize="12"
Foreground="#333333"
Margin="4,0,0,0" />
</StackPanel>
<ProgressBar Grid.Column="2" <ProgressBar
Value="{Binding ProcessingProgress}" Grid.Column="2"
Minimum="0" Maximum="1" Height="10"
Height="10" Margin="0,0,8,0"
VerticalAlignment="Center" VerticalAlignment="Center"
Margin="0,0,8,0" /> Maximum="1"
Minimum="0"
Value="{Binding ProcessingProgress}" />
</Grid> </Grid>
</Border> </Border>
@@ -44,64 +44,22 @@
CornerRadius="4"> CornerRadius="4">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<!-- Row 0: 工具栏 -->
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="40" /> <!-- Row 1: 流水线节点列表 -->
<RowDefinition Height="2*" /> <RowDefinition Height="3*" />
<!-- Row 2: 分隔线 -->
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <!-- Row 3: 参数面板 -->
<RowDefinition Height="2*" MinHeight="80" />
<!-- Row 4: 状态栏 -->
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- 标题栏:流水线名称 + 设备选择 --> <!-- 标题栏:流水线名称 + 设备选择 -->
<Border
Grid.Row="0"
Padding="8,5"
Background="#F0F0F0"
BorderBrush="{StaticResource PanelBorder}"
BorderThickness="0,0,0,1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="120" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
Margin="0,0,8,0"
VerticalAlignment="Center"
FontFamily="{StaticResource CsdFont}"
FontSize="12"
FontWeight="Bold"
Foreground="#1c1c1b"
Text="图像处理 ▾" />
<TextBox
Grid.Column="1"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
FontFamily="{StaticResource CsdFont}"
FontSize="11"
Text="{Binding PipelineName, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
Grid.Column="2"
Margin="0,0,4,0"
VerticalAlignment="Center"
FontFamily="{StaticResource CsdFont}"
FontSize="11"
Text="设备:" />
<telerik:RadComboBox
Grid.Column="3"
Height="22"
FontFamily="{StaticResource CsdFont}"
FontSize="11"
ItemsSource="{Binding AvailableDevices}"
SelectedItem="{Binding SelectedDevice}" />
</Grid>
</Border>
<!-- 工具栏 --> <!-- 工具栏 -->
<Border <Border
Grid.Row="1" Grid.Row="0"
Padding="6,4" Padding="6,4"
Background="#F5F5F5" Background="#F5F5F5"
BorderBrush="{StaticResource PanelBorder}" BorderBrush="{StaticResource PanelBorder}"
@@ -150,11 +108,10 @@
</Grid> </Grid>
</Border> </Border>
<!-- 流水线节点列表(拖拽目标) --> <!-- 流水线节点列表(拖拽目标) -->
<ListBox <ListBox
x:Name="PipelineListBox" x:Name="PipelineListBox"
Grid.Row="2" Grid.Row="1"
Background="Transparent" Background="Transparent"
BorderThickness="0" BorderThickness="0"
ItemContainerStyle="{StaticResource PipelineNodeItemStyle}" ItemContainerStyle="{StaticResource PipelineNodeItemStyle}"
@@ -280,13 +237,13 @@
</ListBox> </ListBox>
<!-- 分隔线 --> <!-- 分隔线 -->
<Rectangle <Rectangle
Grid.Row="3" Grid.Row="2"
Height="1" Height="1"
Fill="{StaticResource SeparatorBrush}" /> Fill="{StaticResource SeparatorBrush}" />
<!-- 参数面板 --> <!-- 参数面板 -->
<ScrollViewer <ScrollViewer
Grid.Row="4" Grid.Row="3"
HorizontalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"> VerticalScrollBarVisibility="Auto">
<StackPanel Margin="8,6"> <StackPanel Margin="8,6">
@@ -340,18 +297,18 @@
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
<!-- 状态栏 --> <!-- 状态栏 -->
<Border <Border
Grid.Row="5" Grid.Row="4"
Padding="3,3" Padding="6,4"
Background="#F5F5F5"> Background="#F5F5F5"
BorderBrush="{StaticResource PanelBorder}"
BorderThickness="0,1,0,0">
<TextBlock <TextBlock
FontFamily="{StaticResource CsdFont}" FontFamily="{StaticResource CsdFont}"
FontSize="11" FontSize="11"
Foreground="#555" Foreground="#555"
Text="{Binding StatusMessage}" Text="{Binding StatusMessage, StringFormat='Status: {0}'}"
TextTrimming="CharacterEllipsis" /> TextTrimming="CharacterEllipsis" />
</Border> </Border>
</Grid> </Grid>
+112 -41
View File
@@ -1737,8 +1737,8 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="180" /> <ColumnDefinition Width="180" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="200" /> <ColumnDefinition Width="300" />
<ColumnDefinition Width="200" /> <ColumnDefinition Width="300" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- 左侧: 计划导航 --> <!-- 左侧: 计划导航 -->
@@ -1777,65 +1777,136 @@
<!-- 顶部: 射线源 --> <!-- 顶部: 射线源 -->
<views:RaySourcePanelView Grid.Row="0" /> <views:RaySourcePanelView Grid.Row="0" />
<!-- 中间: 运动控制 / 探测器 通过Tab切换 --> <!-- 中间: 运动控制 / 探测器 通过Tab切换 -->
<views:MotionControlPanelView x:Name="MotionPanel" Grid.Row="1" <views:MotionControlPanelView
x:Name="MotionPanel"
Grid.Row="1"
Visibility="Visible" /> Visibility="Visible" />
<views:DetectorPanelView x:Name="DetectorPanel" Grid.Row="1" <views:DetectorPanelView
x:Name="DetectorPanel"
Grid.Row="1"
Visibility="Collapsed" /> Visibility="Collapsed" />
<!-- 底部: Overview --> <!-- 底部: Overview -->
<Border Grid.Row="2" Background="#E8E8E8" BorderBrush="#CCCCCC" BorderThickness="0,1,0,0">
<StackPanel Orientation="Horizontal" Margin="6,3">
<TextBlock Text="Overview" FontWeight="SemiBold" Foreground="#333333" VerticalAlignment="Center" />
<TextBlock Text=" ▪ " Foreground="#4CAF50" VerticalAlignment="Center" />
</StackPanel>
</Border>
</Grid> </Grid>
<!-- 右侧: 垂直图标Tab栏 --> <!-- 右侧: 垂直图标Tab栏 -->
<Border Grid.Column="1" Background="#5A6A7A" Width="36"> <Border
Grid.Column="1"
Width="36"
Background="#5A6A7A">
<StackPanel VerticalAlignment="Top"> <StackPanel VerticalAlignment="Top">
<!-- 关闭 --> <!-- 关闭 -->
<ToggleButton x:Name="BtnClose" Width="36" Height="36" BorderThickness="0" <ToggleButton
Background="Transparent" Cursor="Hand" ToolTip="关闭面板"> x:Name="BtnClose"
<TextBlock Text="✕" Foreground="White" FontSize="16" FontWeight="Bold" Width="36"
HorizontalAlignment="Center" VerticalAlignment="Center" /> Height="36"
Background="Transparent"
BorderThickness="0"
Cursor="Hand"
ToolTip="关闭面板">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
FontWeight="Bold"
Foreground="White"
Text="✕" />
</ToggleButton> </ToggleButton>
<!-- 最小化 --> <!-- 最小化 -->
<ToggleButton Width="36" Height="36" BorderThickness="0" <ToggleButton
Background="Transparent" Cursor="Hand" ToolTip="最小化"> Width="36"
<TextBlock Text="—" Foreground="White" FontSize="16" FontWeight="Bold" Height="36"
HorizontalAlignment="Center" VerticalAlignment="Center" /> Background="Transparent"
BorderThickness="0"
Cursor="Hand"
ToolTip="最小化">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
FontWeight="Bold"
Foreground="White"
Text="—" />
</ToggleButton> </ToggleButton>
<!-- 射线源 --> <!-- 射线源 -->
<ToggleButton Width="36" Height="36" BorderThickness="0" <ToggleButton
Background="Transparent" Cursor="Hand" ToolTip="射线源"> Width="36"
<TextBlock Text="☢" Foreground="White" FontSize="18" Height="36"
HorizontalAlignment="Center" VerticalAlignment="Center" /> Background="Transparent"
BorderThickness="0"
Cursor="Hand"
ToolTip="射线源">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="☢" />
</ToggleButton> </ToggleButton>
<!-- 探测器 --> <!-- 探测器 -->
<ToggleButton x:Name="BtnDetector" Width="36" Height="36" BorderThickness="0" <ToggleButton
Background="Transparent" Cursor="Hand" ToolTip="探测器" x:Name="BtnDetector"
Click="OnDetectorTabClick"> Width="36"
<TextBlock Text="📷" Foreground="White" FontSize="16" Height="36"
HorizontalAlignment="Center" VerticalAlignment="Center" /> Background="Transparent"
BorderThickness="0"
Click="OnDetectorTabClick"
Cursor="Hand"
ToolTip="探测器">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="White"
Text="📷" />
</ToggleButton> </ToggleButton>
<!-- 运动控制 (默认选中,橙色高亮) --> <!-- 运动控制 (默认选中,橙色高亮) -->
<ToggleButton x:Name="BtnMotion" Width="36" Height="36" BorderThickness="0" <ToggleButton
Background="#F0A030" IsChecked="True" Cursor="Hand" ToolTip="运动控制" x:Name="BtnMotion"
Click="OnMotionTabClick"> Width="36"
<TextBlock Text="✥" Foreground="#D4A017" FontSize="22" FontWeight="Bold" Height="36"
HorizontalAlignment="Center" VerticalAlignment="Center" /> Background="#F0A030"
BorderThickness="0"
Click="OnMotionTabClick"
Cursor="Hand"
IsChecked="True"
ToolTip="运动控制">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="22"
FontWeight="Bold"
Foreground="#D4A017"
Text="✥" />
</ToggleButton> </ToggleButton>
<!-- 其他工具 --> <!-- 其他工具 -->
<ToggleButton Width="36" Height="36" BorderThickness="0" <ToggleButton
Background="Transparent" Cursor="Hand" ToolTip="工具"> Width="36"
<TextBlock Text="🔧" Foreground="White" FontSize="15" Height="36"
HorizontalAlignment="Center" VerticalAlignment="Center" /> Background="Transparent"
BorderThickness="0"
Cursor="Hand"
ToolTip="工具">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="15"
Foreground="White"
Text="🔧" />
</ToggleButton> </ToggleButton>
<!-- 网格 --> <!-- 网格 -->
<ToggleButton Width="36" Height="36" BorderThickness="0" <ToggleButton
Background="Transparent" Cursor="Hand" ToolTip="网格"> Width="36"
<TextBlock Text="⊞" Foreground="White" FontSize="18" Height="36"
HorizontalAlignment="Center" VerticalAlignment="Center" /> Background="Transparent"
BorderThickness="0"
Cursor="Hand"
ToolTip="网格">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="⊞" />
</ToggleButton> </ToggleButton>
</StackPanel> </StackPanel>
</Border> </Border>