fix: update MenuFlyout to use ShowMode for context menus in SelectableTextBlock and TextBox (#739)

(cherry picked from commit edacd88fa7)
This commit is contained in:
Zhang Dian
2026-02-09 14:46:29 +08:00
parent d5eec907a3
commit c61ac70125
2 changed files with 8 additions and 2 deletions

View File

@@ -2,7 +2,10 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<MenuFlyout x:Key="SelectableTextBlockContextFlyout" Placement="Bottom">
<MenuFlyout
x:Key="SelectableTextBlockContextFlyout"
ShowMode="{OnFormFactor Desktop=Standard, Mobile=Transient}"
Placement="Bottom">
<MenuItem
Command="{Binding $parent[SelectableTextBlock].Copy}"
Header="{DynamicResource STRING_MENU_COPY}"

View File

@@ -1,7 +1,10 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<MenuFlyout x:Key="DefaultTextBoxContextFlyout" Placement="Bottom">
<MenuFlyout
x:Key="DefaultTextBoxContextFlyout"
ShowMode="{OnFormFactor Desktop=Standard, Mobile=Transient}"
Placement="Bottom">
<MenuItem
Command="{Binding $parent[TextBox].Cut}"
Header="{DynamicResource STRING_MENU_CUT}"