mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-05-01 21:41:27 +08:00
Merge pull request #182 from irihitech/168-margin
fix: MenuFlyoutPresenter margin.
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
<Border
|
<Border
|
||||||
MinHeight="{TemplateBinding MinHeight}"
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
MaxWidth="{TemplateBinding MaxWidth}"
|
MaxWidth="{TemplateBinding MaxWidth}"
|
||||||
Margin="0,4"
|
Margin="4"
|
||||||
Padding="{TemplateBinding Padding}"
|
Padding="{TemplateBinding Padding}"
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<ScrollViewer Theme="{StaticResource MenuScrollViewer}">
|
<ScrollViewer Theme="{DynamicResource MenuScrollViewer}">
|
||||||
<ItemsPresenter
|
<ItemsPresenter
|
||||||
Name="PART_ItemsPresenter"
|
Name="PART_ItemsPresenter"
|
||||||
Grid.IsSharedSizeScope="True"
|
Grid.IsSharedSizeScope="True"
|
||||||
|
|||||||
@@ -20,11 +20,11 @@
|
|||||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
||||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||||
<Setter Property="FlyoutPresenter.CornerRadius" Value="{DynamicResource FlyoutCornerRadius}" />
|
<Setter Property="FlyoutPresenter.CornerRadius" Value="{DynamicResource FlyoutCornerRadius}" />
|
||||||
<Setter Property="FlyoutPresenter.Margin" Value="4" />
|
|
||||||
<Setter Property="FlyoutPresenter.Template">
|
<Setter Property="FlyoutPresenter.Template">
|
||||||
<ControlTemplate TargetType="FlyoutPresenter">
|
<ControlTemplate TargetType="FlyoutPresenter">
|
||||||
<Border
|
<Border
|
||||||
Name="LayoutRoot"
|
Name="LayoutRoot"
|
||||||
|
Margin="4"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
|||||||
@@ -13,31 +13,26 @@
|
|||||||
<Setter Property="MenuFlyoutPresenter.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />
|
<Setter Property="MenuFlyoutPresenter.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />
|
||||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
||||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||||
<Setter Property="MenuFlyoutPresenter.Margin" Value="4" />
|
<Setter Property="MenuFlyoutPresenter.CornerRadius" Value="{DynamicResource MenuFlyoutCornerRadius}" />
|
||||||
<Setter Property="MenuFlyoutPresenter.CornerRadius" Value="{DynamicResource OverlayCornerRadius}" />
|
|
||||||
<Setter Property="MenuFlyoutPresenter.Template">
|
<Setter Property="MenuFlyoutPresenter.Template">
|
||||||
<ControlTemplate TargetType="MenuFlyoutPresenter">
|
<ControlTemplate TargetType="MenuFlyoutPresenter">
|
||||||
<Border
|
<Border
|
||||||
Name="LayoutRoot"
|
Name="LayoutRoot"
|
||||||
MinWidth="{DynamicResource MenuFlyoutMinWidth}"
|
Margin="4"
|
||||||
MinHeight="{DynamicResource MenuFlyoutMinHeight}"
|
Background="{TemplateBinding Background}"
|
||||||
MaxWidth="{DynamicResource MenuFlyoutMaxWidth}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
MaxHeight="{DynamicResource MenuFlyoutMaxHeight}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
Margin="8"
|
|
||||||
Padding="{DynamicResource MenuFlyoutPadding}"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Background="{DynamicResource MenuFlyoutBackground}"
|
|
||||||
BorderBrush="{DynamicResource MenuFlyoutBorderBrush}"
|
|
||||||
BorderThickness="{DynamicResource MenuFlyoutBorderThickness}"
|
|
||||||
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
||||||
CornerRadius="{DynamicResource MenuFlyoutCornerRadius}">
|
ClipToBounds="False"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
UseLayoutRounding="False">
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||||
Theme="{StaticResource MenuScrollViewer}"
|
Theme="{StaticResource MenuScrollViewer}"
|
||||||
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||||
<ItemsPresenter
|
<ItemsPresenter
|
||||||
Name="PART_ItemsPresenter"
|
Name="PART_ItemsPresenter"
|
||||||
Margin="{DynamicResource MenuFlyoutScrollerMargin}"
|
Margin="{TemplateBinding Padding}"
|
||||||
Grid.IsSharedSizeScope="True"
|
Grid.IsSharedSizeScope="True"
|
||||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||||
KeyboardNavigation.TabNavigation="Continue" />
|
KeyboardNavigation.TabNavigation="Continue" />
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="#35363C" />
|
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="#35363C" />
|
||||||
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="#F9F9F9" />
|
||||||
<Thickness x:Key="MenuFlyoutBorderThickness">1</Thickness>
|
<Thickness x:Key="MenuFlyoutBorderThickness">1</Thickness>
|
||||||
<Thickness x:Key="MenuFlyoutPadding">0 4</Thickness>
|
<Thickness x:Key="MenuFlyoutPadding">8</Thickness>
|
||||||
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
|
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
|
||||||
<CornerRadius x:Key="MenuFlyoutCornerRadius">6</CornerRadius>
|
<CornerRadius x:Key="MenuFlyoutCornerRadius">6</CornerRadius>
|
||||||
<sys:Double x:Key="MenuFlyoutMinHeight">16</sys:Double>
|
<sys:Double x:Key="MenuFlyoutMinHeight">16</sys:Double>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="White" />
|
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="White" />
|
||||||
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||||
<Thickness x:Key="MenuFlyoutBorderThickness">1</Thickness>
|
<Thickness x:Key="MenuFlyoutBorderThickness">1</Thickness>
|
||||||
<Thickness x:Key="MenuFlyoutPadding">0 4</Thickness>
|
<Thickness x:Key="MenuFlyoutPadding">8</Thickness>
|
||||||
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1A000000</BoxShadows>
|
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1A000000</BoxShadows>
|
||||||
<CornerRadius x:Key="MenuFlyoutCornerRadius">6</CornerRadius>
|
<CornerRadius x:Key="MenuFlyoutCornerRadius">6</CornerRadius>
|
||||||
<sys:Double x:Key="MenuFlyoutMinHeight">16</sys:Double>
|
<sys:Double x:Key="MenuFlyoutMinHeight">16</sys:Double>
|
||||||
|
|||||||
Reference in New Issue
Block a user