优化更新代码,添加界面功能并整合
This commit is contained in:
40
WPFluent/Controls/Menu/Menu.xaml
Normal file
40
WPFluent/Controls/Menu/Menu.xaml
Normal file
@@ -0,0 +1,40 @@
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the MIT License.
|
||||
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
All Rights Reserved.
|
||||
-->
|
||||
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:WPFluent.Controls">
|
||||
|
||||
<Style x:Key="DefaultMenuStyle" TargetType="{x:Type Menu}">
|
||||
<Setter Property="Background" Value="{DynamicResource MenuBarBackground}" />
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Menu}">
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<StackPanel
|
||||
ClipToBounds="True"
|
||||
IsItemsHost="True"
|
||||
Orientation="Horizontal" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="{x:Type Menu}"
|
||||
BasedOn="{StaticResource DefaultMenuStyle}"
|
||||
TargetType="{x:Type Menu}" />
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user