|
31 | 31 | </ThemeVariantScope>
|
32 | 32 | </Design.PreviewWith>
|
33 | 33 |
|
| 34 | + <MenuFlyout x:Key="DefaultTextBoxContextFlyout"> |
| 35 | + <MenuItem Header="{DynamicResource StringTextFlyoutCutText}" Command="{Binding $parent[TextBox].Cut}" |
| 36 | + IsEnabled="{Binding $parent[TextBox].CanCut}" InputGesture="{x:Static TextBox.CutGesture}" /> |
| 37 | + <MenuItem Header="{DynamicResource StringTextFlyoutCopyText}" Command="{Binding $parent[TextBox].Copy}" |
| 38 | + IsEnabled="{Binding $parent[TextBox].CanCopy}" InputGesture="{x:Static TextBox.CopyGesture}" /> |
| 39 | + <MenuItem Header="{DynamicResource StringTextFlyoutPasteText}" Command="{Binding $parent[TextBox].Paste}" |
| 40 | + IsEnabled="{Binding $parent[TextBox].CanPaste}" InputGesture="{x:Static TextBox.PasteGesture}" /> |
| 41 | + </MenuFlyout> |
| 42 | + <MenuFlyout x:Key="HorizontalTextBoxContextFlyout" |
| 43 | + FlyoutPresenterTheme="{StaticResource HorizontalMenuFlyoutPresenter}" |
| 44 | + ItemContainerTheme="{StaticResource HorizontalMenuItem}"> |
| 45 | + <MenuItem Header="{DynamicResource StringTextFlyoutCutText}" Command="{Binding $parent[TextBox].Cut}" |
| 46 | + IsEnabled="{Binding $parent[TextBox].CanCut}" IsVisible="{Binding $parent[TextBox].CanCut}" /> |
| 47 | + <MenuItem Header="{DynamicResource StringTextFlyoutCopyText}" Command="{Binding $parent[TextBox].Copy}" |
| 48 | + IsEnabled="{Binding $parent[TextBox].CanCopy}" IsVisible="{Binding $parent[TextBox].CanCopy}" /> |
| 49 | + <MenuItem Header="{DynamicResource StringTextFlyoutPasteText}" Command="{Binding $parent[TextBox].Paste}" |
| 50 | + IsEnabled="{Binding $parent[TextBox].CanPaste}" /> |
| 51 | + </MenuFlyout> |
| 52 | + |
34 | 53 | <ControlTheme x:Key="FluentTextBoxButton" TargetType="Button">
|
35 | 54 | <Setter Property="Focusable" Value="False" />
|
36 | 55 | <Setter Property="Padding" Value="0" />
|
|
90 | 109 | <Setter Property="MinWidth" Value="{DynamicResource TextControlThemeMinWidth}" />
|
91 | 110 | <Setter Property="FocusAdorner" Value="{x:Null}" />
|
92 | 111 | <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
|
| 112 | + <Setter Property="ContextFlyout" |
| 113 | + Value="{OnFormFactor Desktop={StaticResource DefaultTextBoxContextFlyout}, Mobile={StaticResource HorizontalTextBoxContextFlyout}}" /> |
93 | 114 | <Setter Property="ScrollViewer.AllowAutoHide" Value="False" />
|
94 | 115 | <Setter Property="Template">
|
95 | 116 | <ControlTemplate>
|
|
0 commit comments