#0036 调整主界面布局样式

This commit is contained in:
zhengxuan.zhang
2026-03-17 21:41:29 +08:00
parent 0b9887c4b1
commit b00eef094d
2 changed files with 98 additions and 518 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ namespace XplorePlane
protected override Window CreateShell() protected override Window CreateShell()
{ {
return Container.Resolve<MainWindowB>(); return Container.Resolve<MainWindow>();
} }
protected override void RegisterTypes(IContainerRegistry containerRegistry) protected override void RegisterTypes(IContainerRegistry containerRegistry)
+97 -517
View File
@@ -59,380 +59,118 @@
<telerik:RadRibbonGroup.Variants> <telerik:RadRibbonGroup.Variants>
<telerik:GroupVariant Priority="0" Variant="Large" /> <telerik:GroupVariant Priority="0" Variant="Large" />
</telerik:RadRibbonGroup.Variants> </telerik:RadRibbonGroup.Variants>
<telerik:RadRibbonSplitButton
x:Name="PasteButton" <!-- 实时控制: Live / Snap / 加载 / 保存 -->
telerik:ScreenTip.Description="Paste the contents of the Clipboard." <telerik:RadRibbonButton
telerik:ScreenTip.Title="Paste (Ctrl+V)" telerik:ScreenTip.Description="激活X射线实时模式"
Command="{Binding Path=Paste.Command}" telerik:ScreenTip.Title="实时模式"
IsEnabled="{Binding Path=Paste.IsEnabled}"
LargeImage="{telerik:IconResource IconRelativePath=32/pasteActive.png,
IconSources={StaticResource IconPaths}}"
Size="Large" Size="Large"
Text="Paste"> Text="实时" />
<telerik:RadRibbonSplitButton.DropDownContent> <telerik:RadRibbonButton
<telerik:RadContextMenu Padding="0" BorderThickness="0"> telerik:ScreenTip.Description="冻结当前X射线实时图像"
<telerik:RadMenuGroupItem telerik:ScreenTip.Title="冻结图像"
Background="Transparent" Size="Large"
BorderThickness="0" Text="Snap" />
Header="Paste">
<telerik:RadMenuItem
Command="{Binding Path=Paste.Command}"
Header="Paste"
IsEnabled="{Binding Path=Paste.IsEnabled, Mode=TwoWay}">
<telerik:RadMenuItem.Icon>
<Image Width="16" Source="{telerik:IconResource IconRelativePath=16/pasteNormal.png, IconSources={StaticResource IconPaths}}" />
</telerik:RadMenuItem.Icon>
</telerik:RadMenuItem>
<telerik:RadMenuItem
Command="{Binding Path=PasteFormulas.Command}"
CommandParameter="Formulas"
Header="Formulas"
IsEnabled="{Binding Path=PasteFormulas.IsEnabled, Mode=TwoWay}">
<telerik:RadMenuItem.Icon>
<Image Width="16" Source="{telerik:IconResource IconRelativePath=16/pasteFormulas.png, IconSources={StaticResource IconPaths}}" />
</telerik:RadMenuItem.Icon>
</telerik:RadMenuItem>
<telerik:RadMenuItem
Command="{Binding Path=PasteFormulasAndNumberFormats.Command}"
CommandParameter="FormulasAndNumberFormats"
Header="Formulas &amp; Number Formatting"
IsEnabled="{Binding Path=PasteFormulasAndNumberFormats.IsEnabled, Mode=TwoWay}">
<telerik:RadMenuItem.Icon>
<Image Width="16" Source="{telerik:IconResource IconRelativePath=16/pasteFormulasNumberFormatting.png, IconSources={StaticResource IconPaths}}" />
</telerik:RadMenuItem.Icon>
</telerik:RadMenuItem>
<telerik:RadMenuItem
Command="{Binding Path=PasteColumnWidths.Command}"
CommandParameter="ColumnWidths"
Header="Column Widths"
IsEnabled="{Binding Path=PasteColumnWidths.IsEnabled, Mode=TwoWay}">
<telerik:RadMenuItem.Icon>
<Image Width="16" Source="{telerik:IconResource IconRelativePath=16/pasteKeepSourceColumnWidths.png, IconSources={StaticResource IconPaths}}" />
</telerik:RadMenuItem.Icon>
</telerik:RadMenuItem>
</telerik:RadMenuGroupItem>
<telerik:RadMenuGroupItem
Margin="-1"
Background="Transparent"
BorderThickness="0"
Header="Paste Values">
<telerik:RadMenuItem
Command="{Binding Path=PasteValues.Command}"
CommandParameter="Values"
Header="Values"
IsEnabled="{Binding Path=PasteValues.IsEnabled, Mode=TwoWay}">
<telerik:RadMenuItem.Icon>
<Image Width="16" Source="{telerik:IconResource IconRelativePath=16/pasteValues.png, IconSources={StaticResource IconPaths}}" />
</telerik:RadMenuItem.Icon>
</telerik:RadMenuItem>
<telerik:RadMenuItem
Command="{Binding Path=PasteValuesAndNumberFormats.Command}"
CommandParameter="ValuesAndNumberFormats"
Header="Values &amp; Number Formatting"
IsEnabled="{Binding Path=PasteValuesAndNumberFormats.IsEnabled, Mode=TwoWay}">
<telerik:RadMenuItem.Icon>
<Image Width="16" Source="{telerik:IconResource IconRelativePath=16/pasteValuesNumberFormatting.png, IconSources={StaticResource IconPaths}}" />
</telerik:RadMenuItem.Icon>
</telerik:RadMenuItem>
</telerik:RadMenuGroupItem>
<telerik:RadMenuGroupItem
Margin="-1"
Background="Transparent"
BorderThickness="0"
Header="Other Paste Options">
<telerik:RadMenuItem
Command="{Binding Path=PasteFormatting.Command}"
CommandParameter="Formats"
Header="Formatting"
IsEnabled="{Binding Path=PasteFormatting.IsEnabled, Mode=TwoWay}">
<telerik:RadMenuItem.Icon>
<Image Width="16" Source="{telerik:IconResource IconRelativePath=16/pasteFormatting.png, IconSources={StaticResource IconPaths}}" />
</telerik:RadMenuItem.Icon>
</telerik:RadMenuItem>
</telerik:RadMenuGroupItem>
</telerik:RadContextMenu>
</telerik:RadRibbonSplitButton.DropDownContent>
</telerik:RadRibbonSplitButton>
<StackPanel> <StackPanel>
<telerik:RadRibbonButton <telerik:RadRibbonButton
telerik:ScreenTip.Description="Cut the selection and put it on the Clipboard." telerik:ScreenTip.Title="加载图像"
telerik:ScreenTip.Title="Cut" Command="{Binding OpenFileCommand}"
Command="{Binding Path=Cut.Command}"
IsEnabled="{Binding Path=Cut.IsEnabled}"
Size="Medium" Size="Medium"
SmallImage="{telerik:IconResource IconRelativePath=16/cut.png, Text="📂 加载" />
IconSources={StaticResource IconPaths}}"
Text="Cut" />
<telerik:RadRibbonButton <telerik:RadRibbonButton
telerik:ScreenTip.Description="Copy the selection and put it on the Clipboard." telerik:ScreenTip.Description="保存当前X射线实时图像"
telerik:ScreenTip.Title="Copy" telerik:ScreenTip.Title="保存图像"
Command="{Binding Path=Copy.Command}"
IsEnabled="{Binding Path=Copy.IsEnabled}"
Size="Medium" Size="Medium"
SmallImage="{telerik:IconResource IconRelativePath=16/copy.png, Text="💾 保存" />
IconSources={StaticResource IconPaths}}"
Text="Copy" />
</StackPanel> </StackPanel>
</telerik:RadRibbonGroup> </telerik:RadRibbonGroup>
<telerik:RadRibbonGroup <telerik:RadRibbonGroup Header="快捷工具">
telerik:ScreenTip.Description="Show the Font tab of the Format Cells dialog box."
telerik:ScreenTip.Title="Format Cells: Font"
DialogLauncherCommand="{Binding Path=ShowFormatCellsDialog.Command}"
DialogLauncherCommandParameter="Font"
DialogLauncherVisibility="{Binding Path=ShowFormatCellsDialog.IsEnabled, Converter={StaticResource BoolToVisibilityValueConverter}}"
Header="快捷工具"
IsEnabled="{Binding Path=FontGroup.IsEnabled}">
<telerik:RadRibbonGroup.Variants> <telerik:RadRibbonGroup.Variants>
<telerik:GroupVariant Priority="0" Variant="Large" /> <telerik:GroupVariant Priority="0" Variant="Large" />
</telerik:RadRibbonGroup.Variants> </telerik:RadRibbonGroup.Variants>
<!-- 视图 & 绘图工具 (Small按钮组) -->
<telerik:RadOrderedWrapPanel> <telerik:RadOrderedWrapPanel>
<StackPanel Orientation="Horizontal">
<StackPanel.Resources>
<spreadsheetControls:UnitToDipConverter x:Key="unitToDipConverter" />
<spreadsheetControls:DipToUnitConverter x:Key="dipToUnitConverter" />
<spreadsheetControls:ThemeFontTypeToTextConverter x:Key="themeFontTypeToTextConverter" />
</StackPanel.Resources>
<telerik:RadRibbonComboBox
Width="152"
telerik:RadComboBoxExtensions.UIInteractionCommand="{Binding Path=SetFontFamily.Command}"
telerik:RadComboBoxExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem}"
telerik:ScreenTip.Description="Change the font family."
telerik:ScreenTip.Title="Font"
CanAutocompleteSelectItems="False"
CanKeyboardNavigationSelectItems="False"
IsEditable="False"
IsEnabled="{Binding Path=SetFontFamily.IsEnabled}"
ItemsSource="{Binding ElementName=radSpreadsheet, Path=FontsProvider.RegisteredFonts}"
MaxDropDownHeight="400"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectedValue="{Binding Path=SetFontFamily.SelectedValue, Mode=TwoWay}">
<telerik:RadRibbonComboBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
FontFamily="{Binding Path=FontFamily}"
FontSize="12"
Text="{Binding Path=FontFamily.Source}" />
<TextBlock
Grid.Column="1"
FontFamily="{Binding Path=FontFamily}"
FontSize="12"
Text="{Binding Path=ThemeFontType, Converter={StaticResource themeFontTypeToTextConverter}}" />
</Grid>
</DataTemplate>
</telerik:RadRibbonComboBox.ItemTemplate>
<telerik:RadRibbonComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Width="210" />
</ItemsPanelTemplate>
</telerik:RadRibbonComboBox.ItemsPanel>
</telerik:RadRibbonComboBox>
<telerik:RadRibbonComboBox
Width="62"
Margin="-1,0,0,0"
telerik:RadComboBoxExtensions.UIInteractionCommand="{Binding Path=SetFontSize.Command}"
telerik:RadComboBoxExtensions.UIInteractionCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem, Converter={StaticResource unitToDipConverter}, ConverterParameter=Point}"
telerik:ScreenTip.Description="Change the size of your text."
telerik:ScreenTip.Title="Font Size"
CanAutocompleteSelectItems="False"
CanKeyboardNavigationSelectItems="False"
IsEditable="False"
IsEnabled="{Binding Path=SetFontSize.IsEnabled}"
IsTabStop="False"
ItemsSource="{Binding ElementName=radSpreadsheet, Path=FontsProvider.FontSizes}"
MaxDropDownHeight="400"
SelectedValue="{Binding Path=SetFontSize.SelectedValue, Mode=TwoWay, Converter={StaticResource dipToUnitConverter}, ConverterParameter=Point}" />
</StackPanel>
<telerik:RadButtonGroup> <telerik:RadButtonGroup>
<telerik:RadRibbonButton <telerik:RadRibbonButton
telerik:ScreenTip.Description="Increase the font size." telerik:ScreenTip.Title="中心十字线"
telerik:ScreenTip.Title="Increase Font Size"
Command="{Binding Path=IncreaseFontSize.Command}"
CommandParameter="{Binding Path=IncreaseFontSize.SelectedValue}"
IsEnabled="{Binding Path=IncreaseFontSize.IsEnabled}"
Size="Small" Size="Small"
SmallImage="{telerik:IconResource IconRelativePath=16/fontSizeIncrease.png, SmallImage="/Assets/Icons/十字线.png"
IconSources={StaticResource IconPaths}}" /> Text="✚" />
<telerik:RadRibbonButton <telerik:RadRibbonButton
telerik:ScreenTip.Description="Decrease the font size." telerik:ScreenTip.Title="行灰度分布"
telerik:ScreenTip.Title="Decrease Font Size"
Command="{Binding Path=DecreaseFontSize.Command}"
CommandParameter="{Binding Path=DecreaseFontSize.SelectedValue}"
IsEnabled="{Binding Path=DecreaseFontSize.IsEnabled}"
Size="Small" Size="Small"
SmallImage="{telerik:IconResource IconRelativePath=16/fontSizeDecrease.png, SmallImage="/Assets/Icons/胶片致黑.png"
IconSources={StaticResource IconPaths}}" /> Text="📊" />
</telerik:RadButtonGroup> <telerik:RadRibbonButton
telerik:ScreenTip.Title="画圆"
<telerik:RadButtonGroup x:Name="FontStylesGroup">
<telerik:RadButtonGroup.Resources>
<spreadsheetControls:UnderlineTypeToBooleanConverter x:Key="underlineTypeToBooleanConverter" />
</telerik:RadButtonGroup.Resources>
<telerik:RadRibbonToggleButton
telerik:ScreenTip.Description="Make the selected text bold."
telerik:ScreenTip.Title="Bold (Ctrl+B)"
Command="{Binding Path=SetIsBold.Command}"
CommandParameter="{Binding Path=SetIsBold.SelectedValue}"
IsChecked="{Binding Path=SetIsBold.SelectedValue, Mode=TwoWay}"
IsEnabled="{Binding Path=SetIsBold.IsEnabled}"
Size="Small" Size="Small"
SmallImage="{telerik:IconResource IconRelativePath=16/bold.png, SmallImage="/Assets/Icons/锐化.png"
IconSources={StaticResource IconPaths}}" /> Text="○" />
<telerik:RadRibbonButton
<telerik:RadRibbonToggleButton telerik:ScreenTip.Title="画圆柱"
telerik:ScreenTip.Description="Italicize the selected text."
telerik:ScreenTip.Title="Italic (Ctrl+I)"
Command="{Binding Path=SetIsItalic.Command}"
CommandParameter="{Binding Path=SetIsItalic.SelectedValue}"
IsChecked="{Binding Path=SetIsItalic.SelectedValue, Mode=TwoWay}"
IsEnabled="{Binding Path=SetIsItalic.IsEnabled}"
Size="Small" Size="Small"
SmallImage="{telerik:IconResource IconRelativePath=16/italic.png, SmallImage="/Assets/Icons/动态范围.png"
IconSources={StaticResource IconPaths}}" /> Text="▭" />
<telerik:RadRibbonToggleButton
telerik:ScreenTip.Description="Underline the selected text."
telerik:ScreenTip.Title="Underline (Ctrl+U)"
Command="{Binding Path=SetUnderline.Command}"
CommandParameter="{Binding Path=SetUnderline.SelectedValue}"
IsChecked="{Binding Path=SetUnderline.SelectedValue, Mode=TwoWay, Converter={StaticResource underlineTypeToBooleanConverter}, ConverterParameter=Single}"
IsEnabled="{Binding Path=SetUnderline.IsEnabled}"
Size="Small"
SmallImage="{telerik:IconResource IconRelativePath=16/underline.png,
IconSources={StaticResource IconPaths}}" />
</telerik:RadButtonGroup>
<telerik:RadButtonGroup>
<spreadsheetControls:BordersMenu RadSpreadsheet="{Binding ElementName=radSpreadsheet, Mode=OneTime}" SelectedItemImage="{telerik:IconResource IconRelativePath=16/bottomBorder.png, IconSources={StaticResource IconPaths}}" />
</telerik:RadButtonGroup> </telerik:RadButtonGroup>
<telerik:RadButtonGroup> <telerik:RadButtonGroup>
<telerik:RadColorPicker <telerik:RadRibbonButton
telerik:ScreenTip.Description="Color the background of selected cells." telerik:ScreenTip.Title="白背景检测黑区域"
telerik:ScreenTip.Title="Fill Color" Size="Small"
AutomaticColor="Transparent" SmallImage="/Assets/Icons/胶片致黑.png"
BorderThickness="0" Text="◻" />
Command="{Binding Path=SetFillColor.Command}" <telerik:RadRibbonButton
CommandParameter="{Binding Path=SetFillColor.SelectedValue}" telerik:ScreenTip.Title="黑背景检测白区域"
HeaderPaletteItemsSource="{Binding ElementName=radSpreadsheet, Path=ColorPalette.HeaderPaletteItemsSource}" Size="Small"
IsEnabled="{Binding Path=SetFillColor.IsEnabled}" SmallImage="/Assets/Icons/胶片致黑.png"
IsRecentColorsActive="True" Text="◼" />
MainPaletteItemsSource="{Binding ElementName=radSpreadsheet, Path=ColorPalette.MainPaletteItemsSource}" <telerik:RadRibbonButton
MainPaletteOrientation="{Binding ElementName=radSpreadsheet, Path=ColorPalette.MainPaletteOrientation}" telerik:ScreenTip.Title="缩小"
NoColorText="No Fill" Size="Small"
RecentColorsVisibility="Visible" SmallImage="/Assets/Icons/胶片致黑.png"
SelectedColor="{Binding Path=SetFillColor.SelectedValue, Mode=TwoWay}"> Text="Out" />
<telerik:RadColorPicker.ContentTemplate> <telerik:RadRibbonButton
<DataTemplate> telerik:ScreenTip.Title="放大"
<Grid> Size="Small"
<Image SmallImage="/Assets/Icons/胶片致黑.png"
Width="16" Text="In" />
Source="{telerik:IconResource IconRelativePath=16/bucket.png,
IconSources={StaticResource IconPaths}}"
Stretch="None" />
<Rectangle
Height="4"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom">
<Rectangle.Fill>
<SolidColorBrush Color="{Binding}" />
</Rectangle.Fill>
</Rectangle>
</Grid>
</DataTemplate>
</telerik:RadColorPicker.ContentTemplate>
<telerik:RadColorPicker.AdditionalContent>
<telerik:RadButton
Margin="0,-1,0,0"
HorizontalContentAlignment="Left"
spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
Background="Transparent"
BorderThickness="0"
Command="{Binding Path=ShowMoreColorsDialog.Command}"
CommandParameter="{Binding Path=SetFillColor}"
IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}">
<StackPanel Orientation="Horizontal">
<Image
Width="16"
Height="16"
Source="{telerik:IconResource IconRelativePath=16/color.png,
IconSources={StaticResource IconPaths}}" />
<TextBlock
Margin="10,0,0,0"
FontWeight="Normal"
Text="More Colors..." />
</StackPanel>
</telerik:RadButton>
</telerik:RadColorPicker.AdditionalContent>
</telerik:RadColorPicker>
<telerik:RadColorPicker
telerik:ScreenTip.Description="Change the text color."
telerik:ScreenTip.Title="Text Highlight Color"
BorderThickness="0"
Command="{Binding Path=SetForeColor.Command}"
CommandParameter="{Binding Path=SetForeColor.SelectedValue}"
HeaderPaletteItemsSource="{Binding ElementName=radSpreadsheet, Path=ColorPalette.HeaderPaletteItemsSource}"
IsEnabled="{Binding Path=SetForeColor.IsEnabled}"
MainPaletteItemsSource="{Binding ElementName=radSpreadsheet, Path=ColorPalette.MainPaletteItemsSource}"
MainPaletteOrientation="{Binding ElementName=radSpreadsheet, Path=ColorPalette.MainPaletteOrientation}"
NoColorText="Automatic"
SelectedColor="{Binding Path=SetForeColor.SelectedValue, Mode=TwoWay}">
<telerik:RadColorPicker.ContentTemplate>
<DataTemplate>
<Grid>
<Image
Width="16"
Source="{telerik:IconResource IconRelativePath=16/foregroundColor.png,
IconSources={StaticResource IconPaths}}"
Stretch="None" />
<Rectangle
Height="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom">
<Rectangle.Fill>
<SolidColorBrush Color="{Binding}" />
</Rectangle.Fill>
</Rectangle>
</Grid>
</DataTemplate>
</telerik:RadColorPicker.ContentTemplate>
<telerik:RadColorPicker.AdditionalContent>
<telerik:RadButton
Margin="0,-1,0,0"
HorizontalContentAlignment="Left"
spreadsheetControls:RadControlsExtensions.ShouldCloseParentPopupOnClick="True"
Background="Transparent"
BorderThickness="0"
Command="{Binding Path=ShowMoreColorsDialog.Command}"
CommandParameter="{Binding Path=SetForeColor}"
IsEnabled="{Binding Path=ShowMoreColorsDialog.IsEnabled}">
<StackPanel Orientation="Horizontal">
<Image
Width="16"
Height="16"
Source="{telerik:IconResource IconRelativePath=16/color.png,
IconSources={StaticResource IconPaths}}" />
<TextBlock
Margin="10,0,0,0"
FontWeight="Normal"
Text="More Colors..." />
</StackPanel>
</telerik:RadButton>
</telerik:RadColorPicker.AdditionalContent>
</telerik:RadColorPicker>
</telerik:RadButtonGroup> </telerik:RadButtonGroup>
</telerik:RadOrderedWrapPanel> </telerik:RadOrderedWrapPanel>
<!-- 安全门控 & 系统 -->
<StackPanel>
<telerik:RadRibbonButton
telerik:ScreenTip.Title="开门"
Size="Medium"
SmallImage="{telerik:IconResource IconRelativePath=16/pasteNormal.png,
IconSources={StaticResource IconPaths}}"
Text="开门" />
<telerik:RadRibbonButton
telerik:ScreenTip.Title="关门"
Size="Medium"
SmallImage="{telerik:IconResource IconRelativePath=16/pasteNormal.png,
IconSources={StaticResource IconPaths}}"
Text="关门" />
</StackPanel>
<StackPanel>
<telerik:RadRibbonButton
telerik:ScreenTip.Title="自动模式"
Size="Medium"
SmallImage="{telerik:IconResource IconRelativePath=16/pasteNormal.png,
IconSources={StaticResource IconPaths}}"
Text="自动模式" />
</StackPanel>
<StackPanel>
<telerik:RadRibbonButton
telerik:ScreenTip.Description="系统参数显示"
telerik:ScreenTip.Title="系统参数"
Size="Medium"
Text=" 参数" />
</StackPanel>
</telerik:RadRibbonGroup> </telerik:RadRibbonGroup>
<telerik:RadRibbonGroup <telerik:RadRibbonGroup
@@ -1769,7 +1507,7 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="100" /> <RowDefinition Height="150" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
<RowDefinition Height="300" /> <RowDefinition Height="300" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
@@ -1790,34 +1528,6 @@
Background="#0060A0" Background="#0060A0"
BorderBrush="#004880" BorderBrush="#004880"
BorderThickness="0,1,0,0"> BorderThickness="0,1,0,0">
<Border.Resources>
<Style x:Key="TbBtn" TargetType="Button">
<Setter Property="MinWidth" Value="28" />
<Setter Property="Height" Value="24" />
<Setter Property="Padding" Value="5,0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="#CCCCCC" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FontFamily" Value="Microsoft YaHei UI" />
<Setter Property="FontSize" Value="11" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#0080D0" />
<Setter Property="Foreground" Value="White" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="#555555" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="TbSep" TargetType="Rectangle">
<Setter Property="Width" Value="1" />
<Setter Property="Fill" Value="#3090D0" />
<Setter Property="Margin" Value="2,4" />
</Style>
</Border.Resources>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
@@ -1825,131 +1535,15 @@
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- 左侧: 功能按钮组 --> <!-- 左侧: 状态信息 -->
<StackPanel <TextBlock
Grid.Column="0" Grid.Column="0"
Margin="8,0"
VerticalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal"> FontFamily="Microsoft YaHei UI"
<!-- 1.实时模式 --> FontSize="11"
<Button Foreground="#CCCCCC"
Content="Live" Text="就绪" />
Style="{StaticResource TbBtn}"
ToolTip="激活X射线实时模式" />
<!-- 2.加载图像 -->
<Button
Command="{Binding OpenFileCommand}"
Content="📂"
FontSize="13"
Style="{StaticResource TbBtn}"
ToolTip="加载图像" />
<!-- 3.保存图像 -->
<Button
Content="💾"
FontSize="13"
Style="{StaticResource TbBtn}"
ToolTip="保存当前X射线实时图像" />
<!-- 4.冻结图像 -->
<Button
Content="Snap"
Style="{StaticResource TbBtn}"
ToolTip="冻结当前X射线实时图像" />
<Rectangle Style="{StaticResource TbSep}" />
<!-- 5.中心十字线 -->
<Button
Content="✚"
Style="{StaticResource TbBtn}"
ToolTip="中心十字线" />
<!-- 6.行灰度分布 -->
<Button
Content="📊"
FontSize="13"
Style="{StaticResource TbBtn}"
ToolTip="行灰度分布" />
<!-- 7.画圆 -->
<Button
Content="○"
Style="{StaticResource TbBtn}"
ToolTip="画圆" />
<!-- 8.画圆柱 -->
<Button
Content="▭"
Style="{StaticResource TbBtn}"
ToolTip="画圆柱" />
<!-- 9.白背景检测黑区域 -->
<Button
Content="◻"
Style="{StaticResource TbBtn}"
ToolTip="白背景检测黑区域" />
<!-- 10.黑背景检测白区域 -->
<Button
Content="◼"
Style="{StaticResource TbBtn}"
ToolTip="黑背景检测白区域" />
<Rectangle Style="{StaticResource TbSep}" />
<!-- 11.ΣGv 图像信息 -->
<Button
Content="ΣGv"
Style="{StaticResource TbBtn}"
ToolTip="在主界面显示图像信息" />
<!-- 12.Dose 自动化检测 -->
<Button
Content="Dose"
Style="{StaticResource TbBtn}"
ToolTip="自动化检测程序" />
<!-- 13.探测器控制 -->
<Button
Content="Mats"
Style="{StaticResource TbBtn}"
ToolTip="探测器控制按钮" />
<!-- 14.关于 -->
<Button
Content="Allo"
Style="{StaticResource TbBtn}"
ToolTip="显示关于XMC窗口" />
<!-- 15.Auto -->
<Button
Content="Auto"
Style="{StaticResource TbBtn}"
ToolTip="自动模式" />
<Rectangle Style="{StaticResource TbSep}" />
<!-- 16.开门 -->
<Button
Content="🚪"
FontSize="13"
Style="{StaticResource TbBtn}"
ToolTip="开门" />
<!-- 17.关门 -->
<Button
Content="🔒"
FontSize="13"
Style="{StaticResource TbBtn}"
ToolTip="关门" />
<Rectangle Style="{StaticResource TbSep}" />
<!-- 18.Out 缩小 -->
<Button
Content="Out"
Style="{StaticResource TbBtn}"
ToolTip="缩小" />
<!-- 19.In 放大 -->
<Button
Content="In"
Style="{StaticResource TbBtn}"
ToolTip="放大" />
<Rectangle Style="{StaticResource TbSep}" />
<!-- 20.系统参数 -->
<Button
Content="i"
FontWeight="Bold"
Style="{StaticResource TbBtn}"
ToolTip="系统参数显示" />
<!-- 21.帮助 -->
<Button
Content="?"
FontWeight="Bold"
Foreground="#FF4444"
Style="{StaticResource TbBtn}"
ToolTip="帮助文档" />
</StackPanel>
<!-- 右侧: 鼠标坐标 + RGB --> <!-- 右侧: 鼠标坐标 + RGB -->
<TextBlock <TextBlock
@@ -1961,21 +1555,7 @@
Foreground="#AAAAAA" Foreground="#AAAAAA"
Text="x: 0 y: 0 RGB: 0 0 0" /> Text="x: 0 y: 0 RGB: 0 0 0" />
<!-- 防撞标识 -->
<Border
Grid.Column="2"
Margin="4,2"
Padding="8,0"
Background="#228B22"
CornerRadius="2">
<TextBlock
VerticalAlignment="Center"
FontFamily="Microsoft YaHei UI"
FontSize="11"
FontWeight="Bold"
Foreground="White"
Text="CRASH ON" />
</Border>
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>