使 TextBox 的默认右键菜单符合主题

This commit is contained in:
ZCShou 2020-07-15 10:39:38 +08:00
parent c72e21d660
commit 3c8fc094ac

View file

@ -84,7 +84,15 @@
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border1}"/> <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border1}"/>
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource Template.Validation.Error}"/> <Setter Property="Validation.ErrorTemplate" Value="{StaticResource Template.Validation.Error}"/>
<Setter Property="helpers:TextBoxHelper.AutoScroll" Value="True"/> <Setter Property="helpers:TextBoxHelper.AutoScroll" Value="True"/>
<Setter Property="ContextMenu">
<Setter.Value>
<ContextMenu>
<MenuItem Command="ApplicationCommands.Copy" />
<MenuItem Command="ApplicationCommands.Cut" />
<MenuItem Command="ApplicationCommands.Paste" />
</ContextMenu>
</Setter.Value>
</Setter>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}"> <ControlTemplate TargetType="{x:Type TextBox}">