mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-24 18:36:36 +08:00
fix: update MenuFlyout to use ShowMode for context menus in SelectableTextBlock and TextBox (#739)
This commit is contained in:
@@ -2,7 +2,10 @@
|
|||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
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
|
<MenuItem
|
||||||
Command="{Binding $parent[SelectableTextBlock].Copy}"
|
Command="{Binding $parent[SelectableTextBlock].Copy}"
|
||||||
Header="{DynamicResource STRING_MENU_COPY}"
|
Header="{DynamicResource STRING_MENU_COPY}"
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
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
|
<MenuItem
|
||||||
Command="{Binding $parent[TextBox].Cut}"
|
Command="{Binding $parent[TextBox].Cut}"
|
||||||
Header="{DynamicResource STRING_MENU_CUT}"
|
Header="{DynamicResource STRING_MENU_CUT}"
|
||||||
|
|||||||
Reference in New Issue
Block a user