Merge pull request #36 from irihitech/menu
feat: Add Menu/MenuItem/ContextMenu/MenyFlyout
This commit is contained in:
commit
96a86ce372
128
demo/Semi.Avalonia.Demo/Pages/MenuDemo.axaml
Normal file
128
demo/Semi.Avalonia.Demo/Pages/MenuDemo.axaml
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="Semi.Avalonia.Demo.Pages.MenuDemo"
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<StackPanel Margin="20" Spacing="20">
|
||||||
|
<Menu>
|
||||||
|
<MenuItem Header="_First">
|
||||||
|
<MenuItem Header="Standard _Menu Item" InputGesture="Ctrl+A" />
|
||||||
|
<MenuItem
|
||||||
|
Header="_Disabled Menu Item"
|
||||||
|
InputGesture="Ctrl+D"
|
||||||
|
IsEnabled="False" />
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="Menu with _Submenu">
|
||||||
|
<MenuItem Header="Submenu _1" />
|
||||||
|
<MenuItem Header="Submenu _2 with Submenu">
|
||||||
|
<MenuItem Header="Submenu Level 2" />
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Submenu _3 with Submenu Disabled" IsEnabled="False">
|
||||||
|
<MenuItem Header="Submenu Level 2" />
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Menu Item with _Checkbox">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<TextBlock>😊</TextBlock>
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Second">
|
||||||
|
<MenuItem Header="Second _Menu Item" />
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Parent">
|
||||||
|
<MenuItem Header="Child 1" />
|
||||||
|
<MenuItem Header="Child 2" />
|
||||||
|
<MenuItem Header="Child 3" />
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="Child 4" />
|
||||||
|
<MenuItem Header="Child 5" />
|
||||||
|
<MenuItem Header="Child 6" />
|
||||||
|
<MenuItem Header="Child 7" />
|
||||||
|
<MenuItem Header="Child 8" />
|
||||||
|
<MenuItem Header="Child 9" />
|
||||||
|
<MenuItem Header="Child 10" />
|
||||||
|
<MenuItem Header="Child 11" />
|
||||||
|
<MenuItem Header="Child 12" />
|
||||||
|
<MenuItem Header="Child 13" />
|
||||||
|
<MenuItem Header="Child 14" />
|
||||||
|
<MenuItem Header="Child 15" />
|
||||||
|
<MenuItem Header="Child 16" />
|
||||||
|
<MenuItem Header="Child 17" />
|
||||||
|
<MenuItem Header="Child 18" />
|
||||||
|
<MenuItem Header="Child 19" />
|
||||||
|
<MenuItem Header="Child 4" />
|
||||||
|
<MenuItem Header="Child 5" />
|
||||||
|
<MenuItem Header="Child 6" />
|
||||||
|
<MenuItem Header="Child 7" />
|
||||||
|
<MenuItem Header="Child 8" />
|
||||||
|
<MenuItem Header="Child 9" />
|
||||||
|
<MenuItem Header="Child 10" />
|
||||||
|
<MenuItem Header="Child 11" />
|
||||||
|
<MenuItem Header="Child 12" />
|
||||||
|
<MenuItem Header="Child 13" />
|
||||||
|
<MenuItem Header="Child 14" />
|
||||||
|
<MenuItem Header="Child 15" />
|
||||||
|
<MenuItem Header="Child 16" />
|
||||||
|
<MenuItem Header="Child 17" />
|
||||||
|
<MenuItem Header="Child 18" />
|
||||||
|
<MenuItem Header="Child 19" />
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
|
<Border>
|
||||||
|
<Border.ContextMenu>
|
||||||
|
<ContextMenu>
|
||||||
|
<MenuItem Header="Standard _Menu Item" InputGesture="Ctrl+A" />
|
||||||
|
<MenuItem
|
||||||
|
Header="_Disabled Menu Item"
|
||||||
|
InputGesture="Ctrl+D"
|
||||||
|
IsEnabled="False" />
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="Menu with _Submenu">
|
||||||
|
<MenuItem Header="Submenu _1" />
|
||||||
|
<MenuItem Header="Submenu _2" />
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Menu Item with _Checkbox">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox
|
||||||
|
BorderThickness="0"
|
||||||
|
IsChecked="True"
|
||||||
|
IsHitTestVisible="False" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Menu Item that won't close on click" StaysOpenOnClick="True" />
|
||||||
|
</ContextMenu>
|
||||||
|
</Border.ContextMenu>
|
||||||
|
<TextBlock Text="Context Menu" />
|
||||||
|
</Border>
|
||||||
|
<Border>
|
||||||
|
<Border.ContextFlyout>
|
||||||
|
<MenuFlyout>
|
||||||
|
<MenuItem Header="Standard _Menu Item" InputGesture="Ctrl+A" />
|
||||||
|
<MenuItem
|
||||||
|
Header="_Disabled Menu Item"
|
||||||
|
InputGesture="Ctrl+D"
|
||||||
|
IsEnabled="False" />
|
||||||
|
<Separator />
|
||||||
|
<MenuItem Header="Menu with _Submenu">
|
||||||
|
<MenuItem Header="Submenu _1" />
|
||||||
|
<MenuItem Header="Submenu _2" />
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="Menu Item with _Checkbox">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox
|
||||||
|
BorderThickness="0"
|
||||||
|
IsChecked="True"
|
||||||
|
IsHitTestVisible="False" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuFlyout>
|
||||||
|
</Border.ContextFlyout>
|
||||||
|
<TextBlock Text="Context Flyout" />
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
</UserControl>
|
18
demo/Semi.Avalonia.Demo/Pages/MenuDemo.axaml.cs
Normal file
18
demo/Semi.Avalonia.Demo/Pages/MenuDemo.axaml.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.Pages;
|
||||||
|
|
||||||
|
public partial class MenuDemo : UserControl
|
||||||
|
{
|
||||||
|
public MenuDemo()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
}
|
@ -13,7 +13,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="11.0.0-preview4" />
|
<PackageReference Include="Avalonia" Version="11.0.0-preview4" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview4" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
|
||||||
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
|
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -45,6 +45,9 @@
|
|||||||
<TabItem Header="ListBox">
|
<TabItem Header="ListBox">
|
||||||
<pages:ListBoxDemo />
|
<pages:ListBoxDemo />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
<TabItem Header="Menu">
|
||||||
|
<pages:MenuDemo />
|
||||||
|
</TabItem>
|
||||||
<TabItem Header="Notification">
|
<TabItem Header="Notification">
|
||||||
<pages:NotificationDemo />
|
<pages:NotificationDemo />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
39
src/Semi.Avalonia/Controls/ContextMenu.axaml
Normal file
39
src/Semi.Avalonia/Controls/ContextMenu.axaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<ControlTheme x:Key="{x:Type ContextMenu}" TargetType="ContextMenu">
|
||||||
|
<Setter Property="ContextMenu.Background" Value="{DynamicResource MenuFlyoutBackground}" />
|
||||||
|
<Setter Property="ContextMenu.BorderBrush" Value="{DynamicResource MenuFlyoutBorderBrush}" />
|
||||||
|
<Setter Property="ContextMenu.BorderThickness" Value="{DynamicResource MenuFlyoutBorderThickness}" />
|
||||||
|
<Setter Property="ContextMenu.CornerRadius" Value="{DynamicResource MenuFlyoutCornerRadius}" />
|
||||||
|
<Setter Property="ContextMenu.MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" />
|
||||||
|
<Setter Property="ContextMenu.MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" />
|
||||||
|
<Setter Property="ContextMenu.Padding" Value="{DynamicResource MenuFlyoutPadding}" />
|
||||||
|
<Setter Property="ContextMenu.HorizontalAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="TextBlock.FontWeight" Value="Normal" />
|
||||||
|
<Setter Property="ContextMenu.WindowManagerAddShadowHint" Value="False" />
|
||||||
|
<Setter Property="ContextMenu.Template">
|
||||||
|
<ControlTemplate TargetType="ContextMenu">
|
||||||
|
<Border
|
||||||
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
|
MaxWidth="{TemplateBinding MaxWidth}"
|
||||||
|
Margin="0,4"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
|
<ScrollViewer Theme="{StaticResource MenuScrollViewer}">
|
||||||
|
<ItemsPresenter
|
||||||
|
Name="PART_ItemsPresenter"
|
||||||
|
Grid.IsSharedSizeScope="True"
|
||||||
|
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||||
|
Items="{TemplateBinding Items}"
|
||||||
|
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||||
|
KeyboardNavigation.TabNavigation="Continue" />
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
</ControlTheme>
|
||||||
|
</ResourceDictionary>
|
@ -8,11 +8,14 @@
|
|||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/CheckBox.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/CheckBox.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ComboBox.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ComboBox.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContentControl.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContentControl.axaml" />
|
||||||
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContextMenu.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ItemsControl.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ItemsControl.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Label.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Label.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ListBox.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ListBox.axaml" />
|
||||||
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Menu.axaml" />
|
||||||
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/MenuFlyoutPresenter.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/NotificationCard.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/NotificationCard.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/NumericUpDown.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/NumericUpDown.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/PathIcon.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/PathIcon.axaml" />
|
||||||
|
350
src/Semi.Avalonia/Controls/Menu.axaml
Normal file
350
src/Semi.Avalonia/Controls/Menu.axaml
Normal file
@ -0,0 +1,350 @@
|
|||||||
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:converters="using:Avalonia.Controls.Converters">
|
||||||
|
|
||||||
|
<converters:PlatformKeyGestureConverter x:Key="KeyGestureConverter" />
|
||||||
|
|
||||||
|
<ControlTheme x:Key="MenuScrollViewer" TargetType="ScrollViewer">
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate TargetType="ScrollViewer">
|
||||||
|
<DockPanel>
|
||||||
|
<DockPanel.Styles>
|
||||||
|
<Style Selector="RepeatButton:pressed">
|
||||||
|
<Setter Property="RenderTransform" Value="{x:Null}" />
|
||||||
|
</Style>
|
||||||
|
</DockPanel.Styles>
|
||||||
|
<RepeatButton
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Command="{Binding LineUp, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
|
CornerRadius="0"
|
||||||
|
DockPanel.Dock="Top"
|
||||||
|
RenderTransform="{x:Null}">
|
||||||
|
<RepeatButton.IsVisible>
|
||||||
|
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="0">
|
||||||
|
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
|
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
|
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
|
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
|
</MultiBinding>
|
||||||
|
</RepeatButton.IsVisible>
|
||||||
|
<PathIcon
|
||||||
|
Width="8"
|
||||||
|
Height="8"
|
||||||
|
Data="{DynamicResource MenuScrollViewerUpButtonGlyph}"
|
||||||
|
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
|
||||||
|
</RepeatButton>
|
||||||
|
<RepeatButton
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Command="{Binding LineDown, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
|
CornerRadius="0"
|
||||||
|
DockPanel.Dock="Bottom"
|
||||||
|
RenderTransform="{x:Null}">
|
||||||
|
<RepeatButton.IsVisible>
|
||||||
|
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="100">
|
||||||
|
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
|
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
|
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
|
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
|
||||||
|
</MultiBinding>
|
||||||
|
</RepeatButton.IsVisible>
|
||||||
|
<PathIcon
|
||||||
|
Width="8"
|
||||||
|
Height="8"
|
||||||
|
Data="{DynamicResource MenuScrollViewerDownButtonGlyph}"
|
||||||
|
Foreground="{DynamicResource MenuFlyoutScrollViewerIconForeground}" />
|
||||||
|
</RepeatButton>
|
||||||
|
<ScrollContentPresenter
|
||||||
|
Name="PART_ContentPresenter"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}"
|
||||||
|
CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}"
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
Extent="{TemplateBinding Extent,
|
||||||
|
Mode=TwoWay}"
|
||||||
|
Viewport="{TemplateBinding Viewport,
|
||||||
|
Mode=TwoWay}"
|
||||||
|
Offset="{TemplateBinding Offset,
|
||||||
|
Mode=TwoWay}">
|
||||||
|
<ScrollContentPresenter.GestureRecognizers>
|
||||||
|
<ScrollGestureRecognizer CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}" CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}" />
|
||||||
|
</ScrollContentPresenter.GestureRecognizers>
|
||||||
|
</ScrollContentPresenter>
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
<Style Selector="^ /template/ RepeatButton:pointerover > PathIcon">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonArrowForegroundPointerOver}" />
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="{x:Type Separator}" TargetType="Separator">
|
||||||
|
<Setter Property="Separator.Background" Value="{DynamicResource MenuItemSeparatorBackground}" />
|
||||||
|
<Setter Property="Separator.Focusable" Value="False" />
|
||||||
|
<Setter Property="Separator.Height" Value="{DynamicResource MenuItemSeparatorHeight}" />
|
||||||
|
<Setter Property="Separator.HorizontalAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="Separator.Margin" Value="{DynamicResource MenuItemSeparatorMargin}" />
|
||||||
|
<Setter Property="Separator.Template">
|
||||||
|
<ControlTemplate TargetType="Separator">
|
||||||
|
<Border
|
||||||
|
Height="{TemplateBinding Height}"
|
||||||
|
Padding="{TemplateBinding Margin}"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="{x:Type MenuItem}" TargetType="MenuItem">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource MenuItemBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource MenuItemForeground}" />
|
||||||
|
<Setter Property="MenuItem.Cursor" Value="Hand" />
|
||||||
|
<!-- Narrow padding should be used for mouse input, when non-narrow one should be used for touch input in future. -->
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource MenuItemPadding}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate>
|
||||||
|
<Panel>
|
||||||
|
<Border
|
||||||
|
Name="PART_LayoutRoot"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIcon" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGT" />
|
||||||
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemChevron" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Viewbox
|
||||||
|
Name="PART_IconPresenter"
|
||||||
|
Width="12"
|
||||||
|
Height="12"
|
||||||
|
Margin="{DynamicResource MenuItemIconMargin}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
IsVisible="False"
|
||||||
|
Stretch="UniformToFill"
|
||||||
|
StretchDirection="DownOnly">
|
||||||
|
<ContentPresenter Content="{TemplateBinding Icon}" />
|
||||||
|
</Viewbox>
|
||||||
|
|
||||||
|
<ContentPresenter
|
||||||
|
Name="PART_HeaderPresenter"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Content="{TemplateBinding Header}"
|
||||||
|
RecognizesAccessKey="True" />
|
||||||
|
<TextBlock
|
||||||
|
x:Name="PART_InputGestureText"
|
||||||
|
Grid.Column="2"
|
||||||
|
Margin="{DynamicResource MenuItemInputGestureTextMargin}"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Foreground="{DynamicResource MenuItemInputGestureTextForeground}"
|
||||||
|
Text="{TemplateBinding InputGesture,
|
||||||
|
Converter={StaticResource KeyGestureConverter}}" />
|
||||||
|
<PathIcon
|
||||||
|
Name="PART_ExpandIcon"
|
||||||
|
Grid.Column="3"
|
||||||
|
Width="8"
|
||||||
|
Height="8"
|
||||||
|
Margin="{DynamicResource MenuItemExpandIconMargin}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Data="{DynamicResource MenuItemExpandIconGlyph}"
|
||||||
|
Foreground="{DynamicResource MenuItemExpandIconForeground}" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<Popup
|
||||||
|
Name="PART_Popup"
|
||||||
|
HorizontalOffset="{DynamicResource MenuFlyoutSubItemPopupHorizontalOffset}"
|
||||||
|
IsLightDismissEnabled="False"
|
||||||
|
IsOpen="{TemplateBinding IsSubMenuOpen,
|
||||||
|
Mode=TwoWay}"
|
||||||
|
PlacementMode="Right"
|
||||||
|
WindowManagerAddShadowHint="False">
|
||||||
|
<Border
|
||||||
|
MinWidth="{DynamicResource MenuFlyoutMinWidth}"
|
||||||
|
MinHeight="{DynamicResource MenuFlyoutMinHeight}"
|
||||||
|
MaxWidth="{DynamicResource MenuFlyoutMaxWidth}"
|
||||||
|
MaxHeight="{DynamicResource MenuFlyoutMaxHeight}"
|
||||||
|
Margin="0,4"
|
||||||
|
Padding="{DynamicResource MenuFlyoutPadding}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="{DynamicResource MenuFlyoutBackground}"
|
||||||
|
BorderBrush="{DynamicResource MenuFlyoutBorderBrush}"
|
||||||
|
BorderThickness="{DynamicResource MenuFlyoutBorderThickness}"
|
||||||
|
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
||||||
|
CornerRadius="{DynamicResource MenuFlyoutCornerRadius}">
|
||||||
|
<ScrollViewer Theme="{StaticResource MenuScrollViewer}">
|
||||||
|
<ItemsPresenter
|
||||||
|
Name="PART_ItemsPresenter"
|
||||||
|
Grid.IsSharedSizeScope="True"
|
||||||
|
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||||
|
Items="{TemplateBinding Items}"
|
||||||
|
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
</Panel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
|
||||||
|
<Style Selector="^:icon /template/ Viewbox#PART_IconPresenter">
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:selected">
|
||||||
|
<Style Selector="^ /template/ Border#PART_LayoutRoot">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource MenuItemPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Listen for PART_LayoutRoot:pointerover, so it will not be triggered when subitem is pressed -->
|
||||||
|
<Style Selector="^:pressed /template/ Border#PART_LayoutRoot:pointerover">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource MenuItemPressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource MenuItemDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ TextBlock#PART_InputGestureText">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource MenuItemDisabledInputGestureTextForeground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ PathIcon#PART_ExpandIcon">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource MenuItemDisabledExpandIconForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:open /template/ PathIcon#PART_ExpandIcon">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronSubMenuOpened}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:empty /template/ PathIcon#PART_ExpandIcon">
|
||||||
|
<Setter Property="IsVisible" Value="False" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:separator">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate>
|
||||||
|
<Separator />
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="TopLevelMenuItem" TargetType="MenuItem">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource MenuItemBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource MenuItemForeground}" />
|
||||||
|
<Setter Property="MenuItem.Cursor" Value="Hand" />
|
||||||
|
<!-- Narrow padding should be used for mouse input, when non-narrow one should be used for touch input in future. -->
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource MenuItemPadding}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate>
|
||||||
|
<Border
|
||||||
|
Name="PART_LayoutRoot"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
|
<Panel>
|
||||||
|
<ContentPresenter
|
||||||
|
Name="PART_HeaderPresenter"
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Content="{TemplateBinding Header}"
|
||||||
|
RecognizesAccessKey="True" />
|
||||||
|
<Popup
|
||||||
|
Name="PART_Popup"
|
||||||
|
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
|
IsLightDismissEnabled="True"
|
||||||
|
IsOpen="{TemplateBinding IsSubMenuOpen,
|
||||||
|
Mode=TwoWay}"
|
||||||
|
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
|
||||||
|
WindowManagerAddShadowHint="False">
|
||||||
|
<Border
|
||||||
|
MinWidth="{DynamicResource MenuFlyoutMinWidth}"
|
||||||
|
MinHeight="{DynamicResource MenuFlyoutMinHeight}"
|
||||||
|
MaxWidth="{DynamicResource MenuFlyoutMaxWidth}"
|
||||||
|
MaxHeight="{DynamicResource MenuFlyoutMaxHeight}"
|
||||||
|
Margin="0,4"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="{DynamicResource MenuFlyoutBackground}"
|
||||||
|
BorderBrush="{DynamicResource MenuFlyoutBorderBrush}"
|
||||||
|
BorderThickness="{DynamicResource MenuFlyoutBorderThickness}"
|
||||||
|
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
||||||
|
CornerRadius="{DynamicResource MenuFlyoutCornerRadius}">
|
||||||
|
<ScrollViewer Padding="{DynamicResource MenuFlyoutPadding}" Theme="{StaticResource MenuScrollViewer}">
|
||||||
|
<ItemsPresenter
|
||||||
|
Name="PART_ItemsPresenter"
|
||||||
|
Grid.IsSharedSizeScope="True"
|
||||||
|
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||||
|
Items="{TemplateBinding Items}"
|
||||||
|
ItemsPanel="{TemplateBinding ItemsPanel}" />
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
</Panel>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
|
||||||
|
<Style Selector="^:selected">
|
||||||
|
<Style Selector="^ /template/ Border#PART_LayoutRoot">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource MenuItemPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Listen for PART_LayoutRoot:pointerover, so it will not be triggered when subitem is pressed -->
|
||||||
|
<Style Selector="^:pressed /template/ Border#PART_LayoutRoot:pointerover">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource MenuItemPressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource MenuItemDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="{x:Type Menu}" TargetType="Menu">
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Menu.ItemContainerTheme" Value="{StaticResource TopLevelMenuItem}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate TargetType="Menu">
|
||||||
|
<Border
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
|
<ItemsPresenter
|
||||||
|
Name="PART_ItemsPresenter"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||||
|
Items="{TemplateBinding Items}"
|
||||||
|
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||||
|
KeyboardNavigation.TabNavigation="Continue" />
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
</ControlTheme>
|
||||||
|
</ResourceDictionary>
|
45
src/Semi.Avalonia/Controls/MenuFlyoutPresenter.axaml
Normal file
45
src/Semi.Avalonia/Controls/MenuFlyoutPresenter.axaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<!-- Add Resources Here -->
|
||||||
|
<ControlTheme x:Key="{x:Type MenuFlyoutPresenter}" TargetType="MenuFlyoutPresenter">
|
||||||
|
<Setter Property="MenuFlyoutPresenter.Background" Value="{DynamicResource MenuFlyoutBackground}" />
|
||||||
|
<Setter Property="MenuFlyoutPresenter.BorderBrush" Value="{DynamicResource MenuFlyoutBorderBrush}" />
|
||||||
|
<Setter Property="MenuFlyoutPresenter.BorderThickness" Value="{DynamicResource MenuFlyoutBorderThickness}" />
|
||||||
|
<Setter Property="MenuFlyoutPresenter.Padding" Value="{DynamicResource MenuFlyoutPadding}" />
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
||||||
|
<Setter Property="MenuFlyoutPresenter.Margin" Value="4" />
|
||||||
|
<Setter Property="MenuFlyoutPresenter.CornerRadius" Value="{DynamicResource OverlayCornerRadius}" />
|
||||||
|
<Setter Property="MenuFlyoutPresenter.Template">
|
||||||
|
<ControlTemplate TargetType="MenuFlyoutPresenter">
|
||||||
|
<Border
|
||||||
|
Name="LayoutRoot"
|
||||||
|
MinWidth="{DynamicResource MenuFlyoutMinWidth}"
|
||||||
|
MinHeight="{DynamicResource MenuFlyoutMinHeight}"
|
||||||
|
MaxWidth="{DynamicResource MenuFlyoutMaxWidth}"
|
||||||
|
MaxHeight="{DynamicResource MenuFlyoutMaxHeight}"
|
||||||
|
Margin="0,4"
|
||||||
|
Padding="{DynamicResource MenuFlyoutPadding}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="{DynamicResource MenuFlyoutBackground}"
|
||||||
|
BorderBrush="{DynamicResource MenuFlyoutBorderBrush}"
|
||||||
|
BorderThickness="{DynamicResource MenuFlyoutBorderThickness}"
|
||||||
|
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
|
||||||
|
CornerRadius="{DynamicResource MenuFlyoutCornerRadius}">
|
||||||
|
<ScrollViewer
|
||||||
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||||
|
Theme="{StaticResource MenuScrollViewer}"
|
||||||
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||||
|
<ItemsPresenter
|
||||||
|
Name="PART_ItemsPresenter"
|
||||||
|
Margin="{DynamicResource MenuFlyoutScrollerMargin}"
|
||||||
|
Grid.IsSharedSizeScope="True"
|
||||||
|
ItemTemplate="{TemplateBinding ItemTemplate}"
|
||||||
|
Items="{TemplateBinding Items}"
|
||||||
|
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||||
|
KeyboardNavigation.TabNavigation="Continue" />
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
</ControlTheme>
|
||||||
|
</ResourceDictionary>
|
@ -11,6 +11,7 @@
|
|||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Expander.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Expander.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Label.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Label.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ListBox.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ListBox.axaml" />
|
||||||
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Menu.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/NotificationCard.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/NotificationCard.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/NumericUpDown.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/NumericUpDown.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ProgressBar.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ProgressBar.axaml" />
|
||||||
|
46
src/Semi.Avalonia/Themes/Light/Menu.axaml
Normal file
46
src/Semi.Avalonia/Themes/Light/Menu.axaml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
||||||
|
<!-- Add Resources Here -->
|
||||||
|
|
||||||
|
<PathGeometry x:Key="MenuScrollViewerUpButtonGlyph">M19.637 16.4369C19.0513 17.0227 18.1015 17.0227 17.5157 16.4369L11.8589 10.7801L6.20202 16.4369C5.61623 17.0227 4.66648 17.0227 4.0807 16.4369C3.49491 15.8511 3.49491 14.9014 4.0807 14.3156L10.7982 7.59809C11.384 7.01231 12.3337 7.01231 12.9195 7.59809L19.637 14.3156C20.2228 14.9014 20.2228 15.8511 19.637 16.4369Z</PathGeometry>
|
||||||
|
<PathGeometry x:Key="MenuScrollViewerDownButtonGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry>
|
||||||
|
<PathGeometry x:Key="MenuItemExpandIconGlyph">M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z</PathGeometry>
|
||||||
|
<SolidColorBrush x:Key="MenuFlyoutScrollViewerIconForeground" Opacity="0.62" Color="#1C1F23" />
|
||||||
|
|
||||||
|
<!-- MenuFlyout -->
|
||||||
|
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="White" />
|
||||||
|
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||||
|
<Thickness x:Key="MenuFlyoutBorderThickness">1</Thickness>
|
||||||
|
<Thickness x:Key="MenuFlyoutPadding">8</Thickness>
|
||||||
|
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1A000000</BoxShadows>
|
||||||
|
<CornerRadius x:Key="MenuFlyoutCornerRadius">3</CornerRadius>
|
||||||
|
<sys:Double x:Key="MenuFlyoutMinHeight">16</sys:Double>
|
||||||
|
<sys:Double x:Key="MenuFlyoutMinWidth">100</sys:Double>
|
||||||
|
<sys:Double x:Key="MenuFlyoutMaxHeight">400</sys:Double>
|
||||||
|
<sys:Double x:Key="MenuFlyoutMaxWidth">600</sys:Double>
|
||||||
|
|
||||||
|
<!-- MenuItem -->
|
||||||
|
<SolidColorBrush x:Key="MenuItemBackground" Color="White" />
|
||||||
|
<SolidColorBrush x:Key="MenuItemForeground" Color="#1C1F23" />
|
||||||
|
<Thickness x:Key="MenuItemPadding">8 4</Thickness>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="MenuItemSeparatorBackground" Opacity="0.08" Color="#1C1F23" />
|
||||||
|
<sys:Double x:Key="MenuItemSeparatorHeight">1</sys:Double>
|
||||||
|
<Thickness x:Key="MenuItemSeparatorMargin">2</Thickness>
|
||||||
|
<SolidColorBrush x:Key="MenuItemPointeroverBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
|
<SolidColorBrush x:Key="MenuItemPressedBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
|
|
||||||
|
<Thickness x:Key="MenuItemIconMargin">0 0 12 0</Thickness>
|
||||||
|
<Thickness x:Key="MenuItemInputGestureTextMargin">4 0</Thickness>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="MenuItemInputGestureTextForeground" Color="Gray" />
|
||||||
|
<SolidColorBrush x:Key="MenuItemExpandIconForeground" Opacity="0.62" Color="#1C1F23" />
|
||||||
|
<Thickness x:Key="MenuItemExpandIconMargin">4 0</Thickness>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="MenuItemDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
||||||
|
<SolidColorBrush x:Key="MenuItemDisabledInputGestureTextForeground" Opacity="0.2" Color="#1C1F23" />
|
||||||
|
<SolidColorBrush x:Key="MenuItemDisabledExpandIconForeground" Opacity="0.35" Color="#1C1F23" />
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
Loading…
x
Reference in New Issue
Block a user