fix: 规避 WPF 剪贴板卡顿,修复剪切不清除文本的问题

支持 (Rich)TextBox 复制/剪切/粘贴 和 DataGrid 复制,TextBox默认生效,可通过附加属性 ClipboardInterceptor.EnableSafeClipboard 启用
This commit is contained in:
uye
2025-07-03 22:44:56 +08:00
parent fdf5407ea3
commit 5aad129121
3 changed files with 190 additions and 0 deletions
+2
View File
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:PCL"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:behaviors="clr-namespace:PCL.Controls.Behaviors"
StartupUri="FormMain.xaml"
ShutdownMode="OnExplicitShutdown">
<Application.Resources>
@@ -302,6 +303,7 @@
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="behaviors:ClipboardInterceptor.EnableSafeClipboard" Value="True" />
</Style>
<Style TargetType="PasswordBox">
<Setter Property="FontSize" Value="13" />