C00225155-02/C00225155/MegaRobo.C00225155/MegaRobo.C00225155App/res/MenuDic.xaml

81 lines
4.3 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type Menu}" x:Key="MenuStyle1">
<Setter Property="Background" Value="#EBEBE9"/>
<Setter Property="BorderBrush" Value="#FF666666"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontSize" Value="20"/>
</Style>
<!-- 定义菜单项样式 -->
<Style TargetType="{x:Type MenuItem}" x:Key="MenuItemStyle1">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border x:Name="Border" CornerRadius="3"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<!--<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFCAE0EA" Offset="0.09"/>
--><!--<GradientStop Color="#FF70B0BF"/>--><!--
<GradientStop Color="#FFBCDEE7" Offset="0.982"/>
<GradientStop Color="#FFEEF3F6" Offset="0.657"/>
</LinearGradientBrush>
</Border.Background>-->
<!--<Grid>
<Grid.ColumnDefinitions>
-->
<!--<ColumnDefinition Width="Auto"/>-->
<!--
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>-->
<!-- 图标区域 -->
<!--<Image x:Name="Icon"
Grid.Column="0"
Source="{Binding IconSource}"
VerticalAlignment="Center"
Margin="3"
Width="30"
Height="30"/>-->
<!-- 文本区域 -->
<TextBlock Text="{Binding Header}"
VerticalAlignment="Center" Margin="1"/>
<!--</Grid>-->
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background" Value="Gainsboro"/>
<!--<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="LightCoral" Offset="0"/>
<GradientStop Color="#FF333333" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>-->
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Border" Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="Orange" Offset="0"/>
<GradientStop Color="Orange" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="#1778e9"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Margin" Value="5"/>
</Style>
</ResourceDictionary>