feat: sync upstream.

This commit is contained in:
rabbitism 2024-08-22 18:16:55 +08:00
parent 52afd97a94
commit 7da5934684
No known key found for this signature in database
4 changed files with 5 additions and 9 deletions

View File

@ -13,6 +13,7 @@
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
BringIntoViewOnFocusChange="True"
HorizontalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden"> VerticalScrollBarVisibility="Hidden">
<ItemsPresenter <ItemsPresenter
@ -66,8 +67,7 @@
Name="Container" Name="Container"
Width="{DynamicResource CarouselIndicatorLineWidth}" Width="{DynamicResource CarouselIndicatorLineWidth}"
Height="{DynamicResource CarouselIndicatorLineHeight}" Height="{DynamicResource CarouselIndicatorLineHeight}"
Background="{TemplateBinding Background}"> Background="{TemplateBinding Background}" />
</Border>
</Border> </Border>
</Panel> </Panel>
</ControlTemplate> </ControlTemplate>
@ -90,8 +90,7 @@
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Panel Background="Transparent"> <Panel Background="Transparent">
<Border Padding="2,0" Background="Transparent"> <Border Padding="2,0" Background="Transparent">
<Border Width="{DynamicResource CarouselIndicatorColumnarWidth}" <Border Width="{DynamicResource CarouselIndicatorColumnarWidth}" Height="{DynamicResource CarouselIndicatorColumnarSelectedHeight}">
Height="{DynamicResource CarouselIndicatorColumnarSelectedHeight}">
<Rectangle <Rectangle
Name="Container" Name="Container"
Width="{DynamicResource CarouselIndicatorColumnarWidth}" Width="{DynamicResource CarouselIndicatorColumnarWidth}"
@ -100,7 +99,7 @@
Fill="{TemplateBinding Background}"> Fill="{TemplateBinding Background}">
<Rectangle.Transitions> <Rectangle.Transitions>
<Transitions> <Transitions>
<DoubleTransition Property="Height" Duration="0:0:0.2"></DoubleTransition> <DoubleTransition Property="Height" Duration="0:0:0.2" />
</Transitions> </Transitions>
</Rectangle.Transitions> </Rectangle.Transitions>
</Rectangle> </Rectangle>

View File

@ -10,6 +10,7 @@
<Setter Property="ContextMenu.MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" /> <Setter Property="ContextMenu.MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" />
<Setter Property="ContextMenu.MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" /> <Setter Property="ContextMenu.MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" />
<Setter Property="ContextMenu.Padding" Value="{DynamicResource MenuFlyoutPadding}" /> <Setter Property="ContextMenu.Padding" Value="{DynamicResource MenuFlyoutPadding}" />
<Setter Property="Focusable" Value="True"></Setter>
<Setter Property="ContextMenu.HorizontalAlignment" Value="Stretch" /> <Setter Property="ContextMenu.HorizontalAlignment" Value="Stretch" />
<Setter Property="TextBlock.FontWeight" Value="Normal" /> <Setter Property="TextBlock.FontWeight" Value="Normal" />
<Setter Property="ContextMenu.WindowManagerAddShadowHint" Value="False" /> <Setter Property="ContextMenu.WindowManagerAddShadowHint" Value="False" />

View File

@ -5,7 +5,6 @@
<MenuFlyout x:Key="SelectableTextBlockContextFlyout" Placement="Bottom"> <MenuFlyout x:Key="SelectableTextBlockContextFlyout" Placement="Bottom">
<MenuItem <MenuItem
x:Name="SelectableTextBlockContextFlyoutCopyItem"
Command="{Binding $parent[SelectableTextBlock].Copy}" Command="{Binding $parent[SelectableTextBlock].Copy}"
Header="{DynamicResource STRING_MENU_COPY}" Header="{DynamicResource STRING_MENU_COPY}"
InputGesture="{x:Static TextBox.CopyGesture}" InputGesture="{x:Static TextBox.CopyGesture}"

View File

@ -4,19 +4,16 @@
x:CompileBindings="True"> x:CompileBindings="True">
<MenuFlyout x:Key="DefaultTextBoxContextFlyout" Placement="Bottom"> <MenuFlyout x:Key="DefaultTextBoxContextFlyout" Placement="Bottom">
<MenuItem <MenuItem
x:Name="TextBoxContextFlyoutCutItem"
Command="{Binding $parent[TextBox].Cut}" Command="{Binding $parent[TextBox].Cut}"
Header="{DynamicResource STRING_MENU_CUT}" Header="{DynamicResource STRING_MENU_CUT}"
InputGesture="{x:Static TextBox.CutGesture}" InputGesture="{x:Static TextBox.CutGesture}"
IsEnabled="{Binding $parent[TextBox].CanCut}" /> IsEnabled="{Binding $parent[TextBox].CanCut}" />
<MenuItem <MenuItem
x:Name="TextBoxContextFlyoutCopyItem"
Command="{Binding $parent[TextBox].Copy}" Command="{Binding $parent[TextBox].Copy}"
Header="{DynamicResource STRING_MENU_COPY}" Header="{DynamicResource STRING_MENU_COPY}"
InputGesture="{x:Static TextBox.CopyGesture}" InputGesture="{x:Static TextBox.CopyGesture}"
IsEnabled="{Binding $parent[TextBox].CanCopy}" /> IsEnabled="{Binding $parent[TextBox].CanCopy}" />
<MenuItem <MenuItem
x:Name="TextBoxContextFlyoutPasteItem"
Command="{Binding $parent[TextBox].Paste}" Command="{Binding $parent[TextBox].Paste}"
Header="{DynamicResource STRING_MENU_PASTE}" Header="{DynamicResource STRING_MENU_PASTE}"
InputGesture="{x:Static TextBox.PasteGesture}" InputGesture="{x:Static TextBox.PasteGesture}"