2025-07-11 09:20:23 +08:00
|
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2025-02-10 20:53:40 +08:00
|
|
|
|
2025-07-11 09:20:23 +08:00
|
|
|
<Style TargetType="{x:Type ContextMenu}" x:Key="UiContextMenu">
|
|
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource AcrylicBackgroundFillColorDefaultBrush}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SurfaceStrokeColorFlyoutBrush}" />
|
2025-02-10 20:53:40 +08:00
|
|
|
<Setter Property="MinWidth" Value="140" />
|
|
|
|
|
<Setter Property="Padding" Value="0" />
|
|
|
|
|
<Setter Property="Margin" Value="0" />
|
|
|
|
|
<Setter Property="HasDropShadow" Value="False" />
|
|
|
|
|
<Setter Property="Grid.IsSharedSizeScope" Value="True" />
|
|
|
|
|
<Setter Property="Popup.PopupAnimation" Value="None" />
|
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
|
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ContextMenu}">
|
|
|
|
|
<Border
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="1"
|
2025-07-11 09:20:23 +08:00
|
|
|
CornerRadius="8"
|
|
|
|
|
Padding="0,3,0,3"
|
|
|
|
|
x:Name="Border">
|
2025-02-10 20:53:40 +08:00
|
|
|
<Border.RenderTransform>
|
|
|
|
|
<TranslateTransform />
|
|
|
|
|
</Border.RenderTransform>
|
|
|
|
|
<StackPanel
|
|
|
|
|
ClipToBounds="True"
|
|
|
|
|
IsItemsHost="True"
|
|
|
|
|
KeyboardNavigation.DirectionalNavigation="Cycle"
|
|
|
|
|
Orientation="Vertical" />
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsOpen" Value="True">
|
|
|
|
|
<Trigger.EnterActions>
|
|
|
|
|
<BeginStoryboard>
|
|
|
|
|
<Storyboard>
|
|
|
|
|
<DoubleAnimation
|
2025-07-11 09:20:23 +08:00
|
|
|
Duration="00:00:00.167"
|
|
|
|
|
From="-90"
|
2025-02-10 20:53:40 +08:00
|
|
|
Storyboard.TargetName="Border"
|
|
|
|
|
Storyboard.TargetProperty="(Border.RenderTransform).(TranslateTransform.Y)"
|
2025-07-11 09:20:23 +08:00
|
|
|
To="0">
|
2025-02-10 20:53:40 +08:00
|
|
|
<DoubleAnimation.EasingFunction>
|
|
|
|
|
<CircleEase EasingMode="EaseOut" />
|
|
|
|
|
</DoubleAnimation.EasingFunction>
|
|
|
|
|
</DoubleAnimation>
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</BeginStoryboard>
|
|
|
|
|
</Trigger.EnterActions>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style BasedOn="{StaticResource UiContextMenu}" TargetType="{x:Type ContextMenu}" />
|
|
|
|
|
|
|
|
|
|
</ResourceDictionary>
|