2025-09-08 19:49:09 +08:00
|
|
|
<ResourceDictionary
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2026-01-02 17:30:30 +08:00
|
|
|
xmlns:controls="clr-namespace:VariaStudio.Controls"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2025-07-31 20:12:24 +08:00
|
|
|
|
2026-01-02 17:30:30 +08:00
|
|
|
<Style TargetType="{x:Type ContextMenu}" x:Key="DefaultTextBoxContextMenuStyle">
|
2025-07-31 20:12:24 +08:00
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
|
<Setter Property="Padding" Value="2,0" />
|
2025-08-12 23:08:54 +08:00
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource BackgroundLayoutBrush}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderGradientBrush}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
|
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
|
|
|
<Setter Property="Grid.IsSharedSizeScope" Value="true" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ContextMenu}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Border
|
2025-08-12 23:08:54 +08:00
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
BorderThickness="0"
|
|
|
|
|
CornerRadius="4"
|
2026-01-02 17:30:30 +08:00
|
|
|
Effect="{DynamicResource PopupShadow}"
|
|
|
|
|
Margin="8"
|
|
|
|
|
Padding="0"
|
|
|
|
|
x:Name="Border">
|
2025-07-31 20:12:24 +08:00
|
|
|
<StackPanel
|
2025-08-12 23:08:54 +08:00
|
|
|
IsItemsHost="True"
|
2026-01-02 17:30:30 +08:00
|
|
|
KeyboardNavigation.DirectionalNavigation="Cycle"
|
|
|
|
|
Margin="2,1" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Border>
|
|
|
|
|
<Rectangle
|
2025-08-12 23:08:54 +08:00
|
|
|
Margin="8"
|
|
|
|
|
RadiusX="4"
|
|
|
|
|
RadiusY="4"
|
|
|
|
|
Stroke="{TemplateBinding BorderBrush}"
|
|
|
|
|
StrokeThickness="{TemplateBinding BorderThickness}" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
2026-01-02 17:30:30 +08:00
|
|
|
<ContextMenu Style="{StaticResource DefaultTextBoxContextMenuStyle}" x:Key="TextBoxContextMenu">
|
2025-07-31 20:12:24 +08:00
|
|
|
<MenuItem Command="ApplicationCommands.Copy">
|
|
|
|
|
<MenuItem.Icon>
|
2025-10-10 11:19:58 +08:00
|
|
|
<controls:IconElement Foreground="{DynamicResource TextPrimaryBrush}" Symbol="ContentCopy" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</MenuItem.Icon>
|
|
|
|
|
</MenuItem>
|
|
|
|
|
<MenuItem Command="ApplicationCommands.Cut">
|
|
|
|
|
<MenuItem.Icon>
|
2025-10-10 11:19:58 +08:00
|
|
|
<controls:IconElement Foreground="{DynamicResource TextPrimaryBrush}" Symbol="ContentCut" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</MenuItem.Icon>
|
|
|
|
|
</MenuItem>
|
|
|
|
|
<MenuItem Command="ApplicationCommands.Paste">
|
|
|
|
|
<MenuItem.Icon>
|
2025-10-10 11:19:58 +08:00
|
|
|
<controls:IconElement Foreground="{DynamicResource TextPrimaryBrush}" Symbol="ContentPaste" />
|
2025-07-31 20:12:24 +08:00
|
|
|
</MenuItem.Icon>
|
|
|
|
|
</MenuItem>
|
|
|
|
|
</ContextMenu>
|
|
|
|
|
</ResourceDictionary>
|