2025-08-12 23:08:54 +08:00
|
|
|
|
<ResourceDictionary
|
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2025-08-20 12:10:35 +08:00
|
|
|
|
xmlns:assists="clr-namespace:NeoUI.Assists"
|
|
|
|
|
|
xmlns:controls="clr-namespace:NeoUI.Controls"
|
|
|
|
|
|
xmlns:sve="clr-namespace:NeoUI.Effects"
|
2025-08-12 23:08:54 +08:00
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 窗口标题按钮 -->
|
|
|
|
|
|
<Style TargetType="{x:Type Button}" x:Key="WindowButton">
|
|
|
|
|
|
<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 Text.Main}" />-->
|
|
|
|
|
|
<!--<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True"/>-->
|
|
|
|
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusVisual}" />
|
|
|
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
|
|
<!--<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True"/>-->
|
|
|
|
|
|
<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="Padding" Value="10" />
|
|
|
|
|
|
|
|
|
|
|
|
<!--<Setter Property="Padding" Value="20,5" />-->
|
|
|
|
|
|
<!--<Setter Property="Padding" Value="4" />-->
|
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
|
|
|
|
<Border
|
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
|
x:Name="border">
|
|
|
|
|
|
<ContentPresenter
|
|
|
|
|
|
Focusable="False"
|
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
|
|
RecognizesAccessKey="True"
|
|
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
|
|
x:Name="contentPresenter" />
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<!--<Trigger Property="IsDefaulted" Value="True" />-->
|
|
|
|
|
|
<!--<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
|
<Setter TargetName="border" Property="Background" Value="{DynamicResource Background.Button}" />
|
|
|
|
|
|
<Setter TargetName="border" Property="Effect">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<sve:BrightnessContrastEffect Brightness="0.1" />
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
<Setter Property="Opacity" Value="1" />
|
|
|
|
|
|
</Trigger>-->
|
|
|
|
|
|
<MultiTrigger>
|
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
|
|
|
|
<Condition Property="Background" Value="Transparent" />
|
|
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
|
|
<Setter Property="Background" TargetName="border" Value="{DynamicResource BackgroundLayoutBrush}" />
|
|
|
|
|
|
<Setter Property="Effect" TargetName="border">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<sve:BrightnessContrastEffect Brightness="0.1" />
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
<Setter Property="Opacity" Value="1" />
|
|
|
|
|
|
</MultiTrigger>
|
|
|
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
|
|
|
<Setter Property="Effect" TargetName="border">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<sve:BrightnessContrastEffect Brightness="0.05" />
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource ControlBackgroundDisabledBrush}" />
|
|
|
|
|
|
|
|
|
|
|
|
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{Binding Path=(assists:ShadingAssist.DisabledForeground), RelativeSource={RelativeSource TemplatedParent}}" />
|
|
|
|
|
|
|
|
|
|
|
|
<!--<Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{DynamicResource Text.Main.Disabled}" />-->
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
<Style TargetType="{x:Type ResizeGrip}" x:Key="ResizeGripStyle">
|
|
|
|
|
|
<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
|
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
Height="18"
|
|
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
|
Width="18">
|
|
|
|
|
|
<Grid.Resources>
|
|
|
|
|
|
<Style TargetType="Rectangle">
|
|
|
|
|
|
<!--<Setter Property="Fill" Value="{Binding BorderBackgroundBrush, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" />-->
|
|
|
|
|
|
<Setter Property="Fill" Value="{DynamicResource TextPrimaryBrush}" />
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<Style TargetType="controls:NeoWindow">
|
2025-08-12 23:08:54 +08:00
|
|
|
|
<Setter Property="Background" Value="{DynamicResource BackgroundContainerBrush}" />
|
|
|
|
|
|
<Setter Property="WindowChrome.WindowChrome">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<WindowChrome UseAeroCaptionButtons="False">
|
|
|
|
|
|
<!-- <WindowChrome.ResizeBorderThickness>6</WindowChrome.ResizeBorderThickness> -->
|
|
|
|
|
|
<!-- <WindowChrome.NonClientFrameEdges>Left,Bottom,Right</WindowChrome.NonClientFrameEdges> -->
|
|
|
|
|
|
</WindowChrome>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
|
<Setter.Value>
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<ControlTemplate TargetType="controls:NeoWindow">
|
2025-08-12 23:08:54 +08:00
|
|
|
|
<ControlTemplate.Resources>
|
|
|
|
|
|
<!-- 激活窗口后,窗口内容逐渐清晰,不透明度增加到1 -->
|
|
|
|
|
|
<Storyboard x:Key="OpacityInStoryboard">
|
|
|
|
|
|
<DoubleAnimation
|
|
|
|
|
|
Duration="0:0:0.2"
|
|
|
|
|
|
From="0.75"
|
|
|
|
|
|
Storyboard.TargetProperty="Opacity"
|
|
|
|
|
|
To="1">
|
|
|
|
|
|
<DoubleAnimation.EasingFunction>
|
|
|
|
|
|
<SineEase EasingMode="EaseOut" />
|
|
|
|
|
|
</DoubleAnimation.EasingFunction>
|
|
|
|
|
|
</DoubleAnimation>
|
|
|
|
|
|
</Storyboard>
|
|
|
|
|
|
<Storyboard x:Key="OpacityOutStoryboard">
|
|
|
|
|
|
<DoubleAnimation
|
|
|
|
|
|
Duration="0:0:0.2"
|
|
|
|
|
|
From="1"
|
|
|
|
|
|
Storyboard.TargetProperty="Opacity"
|
|
|
|
|
|
To="0.75">
|
|
|
|
|
|
<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>
|
|
|
|
|
|
<Grid Background="{TemplateBinding Background}" x:Name="RootGrid">
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="32" />
|
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<!-- 自定义标题栏 -->
|
|
|
|
|
|
<!-- 上方背景 -->
|
|
|
|
|
|
<!--<Border Background="{Binding Path=(assists:WindowAssist.TitleBarBackground), RelativeSource={RelativeSource TemplatedParent}}" />-->
|
|
|
|
|
|
<Border
|
|
|
|
|
|
Background="{TemplateBinding assists:WindowAssist.TitleBarBackground}"
|
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
|
Grid.ColumnSpan="3"
|
|
|
|
|
|
Grid.Row="0" />
|
|
|
|
|
|
<StackPanel
|
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
|
Orientation="Horizontal">
|
|
|
|
|
|
<!-- 图标容器 -->
|
|
|
|
|
|
<Image
|
|
|
|
|
|
Margin="10,10,4,4"
|
|
|
|
|
|
Panel.ZIndex="2048"
|
|
|
|
|
|
RenderOptions.BitmapScalingMode="HighQuality"
|
|
|
|
|
|
Source="{TemplateBinding Icon}"
|
|
|
|
|
|
Stretch="Uniform"
|
|
|
|
|
|
VerticalAlignment="Center" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 左侧标题栏容器 -->
|
|
|
|
|
|
<ContentControl
|
2025-08-20 12:10:35 +08:00
|
|
|
|
Content="{TemplateBinding TitleBarLeftContent}"
|
2025-08-12 23:08:54 +08:00
|
|
|
|
Margin="0,6,8,0"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
VerticalContentAlignment="Center"
|
|
|
|
|
|
WindowChrome.IsHitTestVisibleInChrome="True"
|
|
|
|
|
|
x:Name="LeftContent" />
|
|
|
|
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
<!-- 标题 -->
|
|
|
|
|
|
<Label
|
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
|
Margin="0,6,0,0"
|
|
|
|
|
|
Padding="12,2">
|
|
|
|
|
|
<TextBlock
|
|
|
|
|
|
FontSize="14"
|
|
|
|
|
|
Foreground="{DynamicResource TextPrimaryBrush}"
|
|
|
|
|
|
Text="{TemplateBinding Title}"
|
|
|
|
|
|
x:Name="TitleBlock">
|
|
|
|
|
|
<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
|
|
|
|
|
|
Grid.Column="2"
|
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
|
Orientation="Horizontal"
|
|
|
|
|
|
WindowChrome.IsHitTestVisibleInChrome="True">
|
|
|
|
|
|
<!-- 右侧内容容器 -->
|
|
|
|
|
|
<ContentControl
|
2025-08-20 12:10:35 +08:00
|
|
|
|
Content="{TemplateBinding TitleBarRightContent}"
|
2025-08-12 23:08:54 +08:00
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
VerticalContentAlignment="Center"
|
|
|
|
|
|
WindowChrome.IsHitTestVisibleInChrome="True"
|
|
|
|
|
|
x:Name="RightContent" />
|
|
|
|
|
|
<!-- 功能按钮 -->
|
|
|
|
|
|
<Button x:Name="minimizeButton">
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
|
<Viewbox
|
|
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
|
Stretch="Uniform"
|
|
|
|
|
|
UseLayoutRounding="True">
|
|
|
|
|
|
<Path Data="F1 M1024,1024z M0,0z M45.60213333,478.13973333L978.39786667,478.13973333C1001.33546667,478.13973333 1012.25813334,489.60853333 1012.80426667,512.54613333 1012.80426667,535.48373333 1001.33546667,546.95253333 978.39786667,546.95253333L45.60213333,546.95253333C22.66453333,546.95253333 11.19573333,535.48373333 11.19573333,512.54613333 11.19573333,489.0624 22.66453333,478.13973333 45.60213333,478.13973333z" Fill="{DynamicResource TextPrimaryBrush}" />
|
|
|
|
|
|
</Viewbox>
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
<Button x:Name="maximizeRestoreButton">
|
|
|
|
|
|
<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>
|
|
|
|
|
|
<Viewbox
|
|
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
|
Stretch="Uniform"
|
|
|
|
|
|
UseLayoutRounding="True">
|
|
|
|
|
|
<Path Data="F1 M1024,1024z M0,0z M926.45937303,97.54062697L926.45937303,925.83799467 97.54062697,925.83799467 97.54062697,97.54062697 926.45937303,97.54062697 M931.4304,19.86833067L92.5696,19.86833067C52.8013843,19.86833067,20.48970903,52.18000592,20.48970903,91.94822163L20.48970903,931.4304C20.48970903,971.1986157,52.80138428,1003.51029097,92.5696,1003.51029097L932.05177837,1003.51029097C971.81999407,1003.51029097,1004.13166934,971.19861572,1004.13166933,931.4304L1004.13166933,92.5696C1004.13166933,52.18000592 971.81999408,19.86833067 931.4304,19.86833067 932.05177837,19.86833067 931.4304,19.86833067 931.4304,19.86833067z" Fill="{DynamicResource TextPrimaryBrush}" />
|
|
|
|
|
|
</Viewbox>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
<!-- 提示 -->
|
|
|
|
|
|
<Setter Property="ToolTip" Value="最大化" />
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Path=WindowState, RelativeSource={RelativeSource TemplatedParent}}" Value="Maximized">
|
|
|
|
|
|
<Setter Property="Content">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<!-- 恢复 -->
|
|
|
|
|
|
<Viewbox
|
|
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
|
Stretch="Uniform"
|
|
|
|
|
|
UseLayoutRounding="True">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Path Data="F1 M1024,1024z M0,0z M739.95130434,284.04869566L739.95130434,942.37206261 81.62793739,942.37206261 81.62793739,284.04869566 739.95130434,284.04869566 M740.55917449,208.06492754L80.4121971,208.06492754C39.07702725,208.06492754,5.03629913,241.49778551,5.03629913,283.44082551L5.03629913,943.5878029C5.03629913,984.92297275,38.4691571,1018.96370087,80.4121971,1018.96370087L740.55917449,1018.96370087C781.89434434,1018.96370087,815.93507246,985.5308429,815.93507246,943.5878029L815.93507246,283.44082551C815.93507246,241.49778551,782.50221449,208.06492754,740.55917449,208.06492754z" Fill="{DynamicResource TextPrimaryBrush}" />
|
|
|
|
|
|
<Path Data="F1 M1024,1024z M0,0z M944.19567304,5.64416928L282.83295536,5.64416928C241.49778551,5.64416928,208.67279768,39.07702725,208.06492754,79.80432696L208.06492754,157.00383536 284.04869566,157.00383536 284.04869566,81.62793739 942.37206261,81.62793739 942.37206261,739.95130434 866.38829449,739.95130434 866.38829449,815.93507246 943.5878029,815.93507246C984.92297275,815.93507246,1017.74796058,782.50221449,1018.35583072,741.16704464L1018.35583072,79.80432696C1018.35583072,39.07702725,984.92297275,5.64416928,944.19567304,5.64416928z" Fill="{DynamicResource TextPrimaryBrush}" />
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Viewbox>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
<Setter Property="ToolTip" Value="恢复" />
|
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
|
|
|
|
<Button x:Name="closeButton">
|
|
|
|
|
|
<Button.Style>
|
|
|
|
|
|
<Style BasedOn="{StaticResource WindowButton}" TargetType="Button">
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource ErrorBrush}" />
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentPrimaryBrush}" />
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Button.Style>
|
|
|
|
|
|
<Viewbox
|
|
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
|
|
Stretch="Uniform"
|
|
|
|
|
|
UseLayoutRounding="True">
|
|
|
|
|
|
<Path Data="F1 M1024,1024z M0,0z M578.36284173,512L1000.67183457,89.69100716C1018.7707914,71.59205033 1018.7707914,41.42712226 1000.67183457,23.32816543 982.57287774,5.22920860000003 952.40794967,5.22920860000003 934.30899284,23.32816543L512,445.63715827 89.69100716,23.32816543C71.59205033,5.22920860000001 41.42712226,5.22920860000001 23.32816543,23.32816543 5.22920860000003,41.42712226 5.22920860000003,71.59205033 23.32816543,89.69100716L445.63715827,512 23.32816543,934.30899284C5.22920860000001,952.40794967 5.22920860000001,982.57287774 23.32816543,1000.67183457 41.42712226,1018.7707914 71.59205033,1018.7707914 89.69100716,1000.67183457L512,578.36284173 934.30899284,1000.67183457C952.40794967,1018.7707914 982.57287774,1018.7707914 1000.67183457,1000.67183457 1018.7707914,982.57287774 1018.7707914,952.40794967 1000.67183457,934.30899284L578.36284173,512z" Fill="{DynamicResource TextPrimaryBrush}" />
|
|
|
|
|
|
</Viewbox>
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
<!-- 窗体内容 -->
|
|
|
|
|
|
<Border
|
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
|
Grid.ColumnSpan="3"
|
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
|
Panel.ZIndex="1000"
|
|
|
|
|
|
VerticalAlignment="Stretch">
|
|
|
|
|
|
<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
|
|
|
|
|
|
Grid.Column="2"
|
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
|
Panel.ZIndex="2048"
|
|
|
|
|
|
Style="{StaticResource ResizeGripStyle}"
|
|
|
|
|
|
x:Name="resizeGrip" />
|
|
|
|
|
|
</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>
|
|
|
|
|
|
</ResourceDictionary>
|