Files
ShrlAlgoToolkit/Melskin/Controls/MelWindow.xaml

458 lines
28 KiB
Plaintext
Raw Normal View History

2025-08-12 23:08:54 +08:00
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2026-02-17 22:17:23 +08:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2026-01-02 17:30:30 +08:00
xmlns:assists="clr-namespace:Melskin.Assists"
2026-02-17 22:17:23 +08:00
xmlns:controls="clr-namespace:Melskin.Controls">
<ControlTemplate x:Key="WindowNormalButtonTemplate" TargetType="{x:Type Button}">
2025-10-10 11:19:58 +08:00
<Border
2026-02-17 22:17:23 +08:00
x:Name="border"
2025-10-10 11:19:58 +08:00
Background="{TemplateBinding Background}"
2026-02-17 22:17:23 +08:00
SnapsToDevicePixels="True">
2025-10-10 11:19:58 +08:00
<ContentPresenter
2026-02-17 22:17:23 +08:00
x:Name="contentPresenter"
2026-01-02 17:30:30 +08:00
Margin="{TemplateBinding Padding}"
2026-02-17 22:17:23 +08:00
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
2026-01-02 17:30:30 +08:00
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
2026-02-17 22:17:23 +08:00
Focusable="False"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
2025-10-10 11:19:58 +08:00
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="Background" Value="Transparent" />
</MultiTrigger.Conditions>
2026-02-17 22:17:23 +08:00
<Setter TargetName="border" Property="Background" Value="{DynamicResource BackgroundLayoutBrush}" />
2025-10-10 11:19:58 +08:00
<!--<Setter TargetName="border" Property="Effect">
<Setter.Value>
<effects:BrightnessContrastEffect Brightness="0.1" />
</Setter.Value>
</Setter>-->
2026-02-17 22:17:23 +08:00
<Setter TargetName="border" Property="Background" Value="#1A000000" />
2025-10-10 11:19:58 +08:00
<Setter Property="Opacity" Value="1" />
</MultiTrigger>
<Trigger Property="IsPressed" Value="True">
<!--<Setter TargetName="border" Property="Effect">
<Setter.Value>
<effects:BrightnessContrastEffect Brightness="0.05" />
</Setter.Value>
</Setter>-->
2026-02-17 22:17:23 +08:00
<Setter TargetName="border" Property="Background" Value="#33000000" />
2025-10-10 11:19:58 +08:00
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource ControlBackgroundDisabledBrush}" />
2026-02-17 22:17:23 +08:00
<Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{Binding Path=(assists:ShadingAssist.DisabledForeground), RelativeSource={RelativeSource TemplatedParent}}" />
2025-10-10 11:19:58 +08:00
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
2026-02-17 22:17:23 +08:00
<ControlTemplate x:Key="WindowCloseButtonTemplate" TargetType="{x:Type Button}">
2025-10-10 11:19:58 +08:00
<Border
2026-02-17 22:17:23 +08:00
x:Name="border"
2025-10-10 11:19:58 +08:00
Background="{TemplateBinding Background}"
2026-02-17 22:17:23 +08:00
SnapsToDevicePixels="True">
2025-10-10 11:19:58 +08:00
<ContentPresenter
2026-02-17 22:17:23 +08:00
x:Name="contentPresenter"
2026-01-02 17:30:30 +08:00
Margin="{TemplateBinding Padding}"
2026-02-17 22:17:23 +08:00
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
2026-01-02 17:30:30 +08:00
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
2026-02-17 22:17:23 +08:00
Focusable="False"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
2025-10-10 11:19:58 +08:00
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
2026-02-17 22:17:23 +08:00
<Setter TargetName="border" Property="Background" Value="#E81123" />
2025-10-10 11:19:58 +08:00
<Setter Property="Foreground" Value="#e0e0e0" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
2026-02-17 22:17:23 +08:00
<Setter TargetName="border" Property="Background" Value="#F1707A" />
2025-10-10 11:19:58 +08:00
<Setter Property="Foreground" Value="#edbebb" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource ControlBackgroundDisabledBrush}" />
<Setter Property="Foreground" Value="{Binding Path=(assists:ShadingAssist.DisabledForeground), RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
2025-08-12 23:08:54 +08:00
<!-- 窗口标题按钮 -->
2026-02-17 22:17:23 +08:00
<Style x:Key="WindowButton" TargetType="{x:Type Button}">
2025-08-12 23:08:54 +08:00
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Focusable" Value="False" />
2025-09-12 09:55:36 +08:00
<Setter Property="UseLayoutRounding" Value="True" />
2025-08-12 23:08:54 +08:00
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource TextDisabledBrush}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
2025-08-26 21:33:20 +08:00
<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusVisual}" />
2025-08-12 23:08:54 +08:00
<Setter Property="FontSize" Value="14" />
2025-09-12 09:55:36 +08:00
<!--<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />-->
2025-08-12 23:08:54 +08:00
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Width" Value="46" />
<Setter Property="Height" Value="32" />
2025-10-10 11:19:58 +08:00
<Setter Property="Template" Value="{StaticResource WindowNormalButtonTemplate}" />
<Style.Triggers>
<Trigger Property="Tag" Value="Close">
<Setter Property="Template" Value="{StaticResource WindowCloseButtonTemplate}" />
</Trigger>
</Style.Triggers>
</Style>
2026-02-17 22:17:23 +08:00
<Style x:Key="WindowCloseButton" TargetType="{x:Type Button}">
2025-10-10 11:19:58 +08:00
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Focusable" Value="False" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource TextDisabledBrush}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusVisual}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Width" Value="46" />
<Setter Property="Height" Value="32" />
<Setter Property="Template" Value="{StaticResource WindowNormalButtonTemplate}" />
2025-08-12 23:08:54 +08:00
</Style>
2025-10-10 11:19:58 +08:00
2026-02-17 22:17:23 +08:00
<Style x:Key="ResizeGripStyle" TargetType="{x:Type ResizeGrip}">
2025-08-12 23:08:54 +08:00
<Setter Property="Background" Value="Transparent" />
<Setter Property="Height" Value="18" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Opacity" Value="0.75" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ResizeGrip}">
<Grid
2026-02-17 22:17:23 +08:00
Width="18"
2026-01-02 17:30:30 +08:00
Height="18"
2026-02-17 22:17:23 +08:00
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
2025-08-12 23:08:54 +08:00
<Grid.Resources>
<Style TargetType="Rectangle">
<!--<Setter Property="Fill" Value="{Binding BorderBackgroundBrush, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" />-->
<Setter Property="Fill" Value="{DynamicResource TextSecondaryBrush}" />
2025-08-12 23:08:54 +08:00
<Setter Property="Height" Value="2" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Width" Value="2" />
</Style>
</Grid.Resources>
<Rectangle Margin="14,2,0,0" />
<Rectangle Margin="14,6,0,0" />
<Rectangle Margin="14,10,0,0" />
<Rectangle Margin="14,14,0,0" />
<Rectangle Margin="10,6,0,0" />
<Rectangle Margin="10,10,0,0" />
<Rectangle Margin="10,14,0,0" />
<Rectangle Margin="6,10,0,0" />
<Rectangle Margin="6,14,0,0" />
<Rectangle Margin="2,14,0,0" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Visibility" Value="Collapsed" />
<Setter Property="Width" Value="18" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=ResizeMode, RelativeSource={RelativeSource TemplatedParent}}" Value="CanResizeWithGrip">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
2026-02-17 22:17:23 +08:00
<Style x:Key="NeoWindowStyle" TargetType="controls:MelWindow">
2025-08-24 13:49:55 +08:00
<Setter Property="Background" Value="{DynamicResource BackgroundLayoutBrush}" />
2025-10-10 11:19:58 +08:00
<Setter Property="MinWidth" Value="300" />
2025-08-12 23:08:54 +08:00
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
2026-02-17 22:17:23 +08:00
<WindowChrome CaptionHeight="32" UseAeroCaptionButtons="True">
2025-10-10 11:19:58 +08:00
<!--<WindowChrome.ResizeBorderThickness>6</WindowChrome.ResizeBorderThickness>
<WindowChrome.NonClientFrameEdges>Left,Bottom,Right</WindowChrome.NonClientFrameEdges>-->
2025-08-12 23:08:54 +08:00
</WindowChrome>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
2026-01-02 17:30:41 +08:00
<ControlTemplate TargetType="controls:MelWindow">
2025-08-12 23:08:54 +08:00
<ControlTemplate.Resources>
<!-- 激活窗口后窗口内容逐渐清晰不透明度增加到1 -->
<Storyboard x:Key="OpacityInStoryboard">
<DoubleAnimation
2026-01-02 17:30:30 +08:00
Storyboard.TargetProperty="Opacity"
2026-02-17 22:17:23 +08:00
From="0.75"
To="1"
Duration="0:0:0.2">
2025-08-12 23:08:54 +08:00
<DoubleAnimation.EasingFunction>
<SineEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
<Storyboard x:Key="OpacityOutStoryboard">
<DoubleAnimation
2026-01-02 17:30:30 +08:00
Storyboard.TargetProperty="Opacity"
2026-02-17 22:17:23 +08:00
From="1"
To="0.75"
Duration="0:0:0.2">
2025-08-12 23:08:54 +08:00
<DoubleAnimation.EasingFunction>
<SineEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</ControlTemplate.Resources>
<Border x:Name="windowBorder">
<Border.Style>
<Style TargetType="{x:Type Border}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=WindowState, RelativeSource={RelativeSource TemplatedParent}}" Value="Normal">
<Setter Property="Padding" Value="0" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=WindowState, RelativeSource={RelativeSource TemplatedParent}}" Value="Maximized">
<Setter Property="Padding" Value="8" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
2026-02-17 22:17:23 +08:00
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
2025-08-12 23:08:54 +08:00
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- 自定义标题栏 -->
<!-- 上方背景 -->
<Border
2026-02-17 22:17:23 +08:00
Grid.Row="0"
2025-08-12 23:08:54 +08:00
Grid.Column="0"
Grid.ColumnSpan="3"
2026-02-17 22:17:23 +08:00
Background="{TemplateBinding assists:ColorAssist.TitleBarBackground}" />
2025-08-12 23:08:54 +08:00
<StackPanel
2026-01-02 17:30:30 +08:00
Grid.Row="0"
2026-02-17 22:17:23 +08:00
Grid.Column="0"
2025-08-12 23:08:54 +08:00
Orientation="Horizontal">
<!-- 图标容器 -->
<Image
Margin="10,10,4,4"
2026-02-17 22:17:23 +08:00
VerticalAlignment="Center"
2025-08-12 23:08:54 +08:00
Panel.ZIndex="2048"
RenderOptions.BitmapScalingMode="HighQuality"
Source="{TemplateBinding Icon}"
2026-02-17 22:17:23 +08:00
Stretch="Uniform" />
2025-08-12 23:08:54 +08:00
<!-- 左侧标题栏容器 -->
<ContentControl
2026-02-17 22:17:23 +08:00
x:Name="LeftContent"
2025-08-12 23:08:54 +08:00
Margin="0,6,8,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
2026-02-17 22:17:23 +08:00
Content="{TemplateBinding TitleBarLeftContent}"
WindowChrome.IsHitTestVisibleInChrome="True" />
2025-08-12 23:08:54 +08:00
</StackPanel>
<!-- 标题 -->
<Label
2026-01-02 17:30:30 +08:00
Grid.Row="0"
2026-02-17 22:17:23 +08:00
Grid.Column="1"
2025-08-12 23:08:54 +08:00
Margin="0,6,0,0"
2026-02-17 22:17:23 +08:00
Padding="12,2"
HorizontalAlignment="Left">
2025-08-12 23:08:54 +08:00
<TextBlock
2026-02-17 22:17:23 +08:00
x:Name="TitleBlock"
2025-08-12 23:08:54 +08:00
FontSize="14"
Foreground="{DynamicResource TextPrimaryBrush}"
2026-02-17 22:17:23 +08:00
Text="{TemplateBinding Title}">
2025-08-12 23:08:54 +08:00
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=WindowStyle, RelativeSource={RelativeSource TemplatedParent}}" Value="None">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=FadeContentIfInactive, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
<Condition Binding="{Binding Path=IsActive, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource OpacityInStoryboard}" />
</MultiDataTrigger.EnterActions>
<MultiDataTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource OpacityOutStoryboard}" />
</MultiDataTrigger.ExitActions>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Label>
<StackPanel
2026-01-02 17:30:30 +08:00
Grid.Row="0"
2026-02-17 22:17:23 +08:00
Grid.Column="2"
2025-08-12 23:08:54 +08:00
HorizontalAlignment="Right"
Orientation="Horizontal"
WindowChrome.IsHitTestVisibleInChrome="True">
<!-- 右侧内容容器 -->
<ContentControl
2026-02-17 22:17:23 +08:00
x:Name="RightContent"
2025-08-12 23:08:54 +08:00
VerticalAlignment="Center"
VerticalContentAlignment="Center"
2026-02-17 22:17:23 +08:00
Content="{TemplateBinding TitleBarRightContent}"
WindowChrome.IsHitTestVisibleInChrome="True" />
2025-08-12 23:08:54 +08:00
<!-- 功能按钮 -->
2026-02-17 22:17:23 +08:00
<Button x:Name="minimizeButton" ToolTip="最小化">
2025-08-12 23:08:54 +08:00
<Button.Style>
<Style BasedOn="{StaticResource WindowButton}" TargetType="Button">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=ResizeMode, RelativeSource={RelativeSource AncestorType=Window}}" Value="NoResize">
<Setter Property="IsEnabled" Value="False" />
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
<controls:IconElement
2026-02-17 22:17:23 +08:00
Padding="0,-14,0,0"
FontSize="24"
Foreground="{Binding ElementName=minimizeButton, Path=Foreground}"
2025-08-12 23:08:54 +08:00
SnapsToDevicePixels="True"
Symbol="Minimize"
UseLayoutRounding="True" />
2025-08-12 23:08:54 +08:00
</Button>
2026-02-17 22:17:23 +08:00
<Button x:Name="maximizeRestoreButton">
2025-08-12 23:08:54 +08:00
<Button.Style>
<Style BasedOn="{StaticResource WindowButton}" TargetType="Button">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=WindowState, RelativeSource={RelativeSource TemplatedParent}}" Value="Normal">
<!-- 最大化 -->
<Setter Property="Content">
<Setter.Value>
<controls:IconElement FontSize="20" Symbol="Fullscreen" />
2025-08-12 23:08:54 +08:00
</Setter.Value>
</Setter>
<!-- 提示 -->
2026-02-17 22:17:23 +08:00
<!--<Setter Property="ToolTip" Value="最大化" />-->
2025-08-12 23:08:54 +08:00
</DataTrigger>
<DataTrigger Binding="{Binding Path=WindowState, RelativeSource={RelativeSource TemplatedParent}}" Value="Maximized">
<Setter Property="Content">
<Setter.Value>
<!-- 恢复 -->
<controls:IconElement FontSize="20" Symbol="FullscreenExit" />
2025-08-12 23:08:54 +08:00
</Setter.Value>
</Setter>
2026-02-17 22:17:23 +08:00
<!--<Setter Property="ToolTip" Value="恢复" />-->
2025-08-12 23:08:54 +08:00
</DataTrigger>
<!-- 切换显示 -->
<DataTrigger Binding="{Binding Path=ResizeMode, RelativeSource={RelativeSource AncestorType=Window}}" Value="NoResize">
<Setter Property="IsEnabled" Value="False" />
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=ResizeMode, RelativeSource={RelativeSource AncestorType=Window}}" Value="CanMinimize">
<Setter Property="IsEnabled" Value="False" />
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
2025-10-10 11:19:58 +08:00
<Button
2026-02-17 22:17:23 +08:00
x:Name="closeButton"
2025-10-10 11:19:58 +08:00
ToolTip="关闭"
2026-02-17 22:17:23 +08:00
WindowChrome.IsHitTestVisibleInChrome="True">
2025-08-12 23:08:54 +08:00
<Button.Style>
<Style BasedOn="{StaticResource WindowButton}" TargetType="Button">
2025-10-10 11:19:58 +08:00
<Setter Property="Tag" Value="Close" />
<!--<Style.Triggers>
2025-09-12 09:55:36 +08:00
<Trigger Property="IsMouseOver" Value="True">
2025-08-12 23:08:54 +08:00
<Setter Property="Background" Value="{DynamicResource ErrorBrush}" />
<Setter Property="Foreground" Value="#e0e0e0" />
2025-08-12 23:08:54 +08:00
</Trigger>
2025-10-10 11:19:58 +08:00
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ErrorPressedBrush}" />
<Setter Property="Foreground" Value="#edbebb" />
</Trigger>
</Style.Triggers>-->
2025-08-12 23:08:54 +08:00
</Style>
</Button.Style>
<controls:IconElement
FontSize="22"
Foreground="{Binding ElementName=closeButton, Path=Foreground}"
2025-08-12 23:08:54 +08:00
SnapsToDevicePixels="True"
Symbol="Close"
UseLayoutRounding="True" />
2025-08-12 23:08:54 +08:00
</Button>
</StackPanel>
<!-- 窗体内容 -->
<Border
2026-02-17 22:17:23 +08:00
Grid.Row="1"
2025-08-12 23:08:54 +08:00
Grid.Column="0"
Grid.ColumnSpan="3"
HorizontalAlignment="Stretch"
2026-02-17 22:17:23 +08:00
VerticalAlignment="Stretch"
2025-08-12 23:08:54 +08:00
Panel.ZIndex="1000"
2026-02-17 22:17:23 +08:00
Background="{TemplateBinding Background}">
2025-08-12 23:08:54 +08:00
<AdornerDecorator>
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}">
<ContentPresenter.Style>
<Style TargetType="ContentPresenter">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=FadeContentIfInactive, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
<Condition Binding="{Binding Path=IsActive, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource OpacityInStoryboard}" />
</MultiDataTrigger.EnterActions>
<MultiDataTrigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource OpacityOutStoryboard}" />
</MultiDataTrigger.ExitActions>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</ContentPresenter.Style>
</ContentPresenter>
</AdornerDecorator>
</Border>
<ResizeGrip
2026-02-17 22:17:23 +08:00
x:Name="resizeGrip"
2026-01-02 17:30:30 +08:00
Grid.Row="1"
2026-02-17 22:17:23 +08:00
Grid.Column="2"
2025-08-12 23:08:54 +08:00
Panel.ZIndex="2048"
2026-02-17 22:17:23 +08:00
Style="{StaticResource ResizeGripStyle}" />
2025-08-12 23:08:54 +08:00
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="WindowState" Value="Normal">
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome ResizeBorderThickness="4" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="WindowState" Value="Maximized">
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome ResizeBorderThickness="0" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="ResizeMode" Value="CanResizeWithGrip">
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome ResizeBorderThickness="4,4,18,18" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
2026-01-02 17:30:41 +08:00
<Style BasedOn="{StaticResource NeoWindowStyle}" TargetType="controls:MelWindow" />
2025-08-12 23:08:54 +08:00
</ResourceDictionary>