Sic.Framework-Nanjing-Baishi/MECF.Framework.UI.Core/Style/NavyBlue/ButtonStyle.xaml

456 lines
24 KiB
Plaintext
Raw Normal View History

2023-04-13 11:51:03 +08:00
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- 按钮通用样式原MiddleButton -->
<SolidColorBrush x:Key="buttonNormal" Color="#FFDFF1FF" />
<SolidColorBrush x:Key="buttonForground" Color="White" />
<SolidColorBrush x:Key="buttonBorder" Color="#FF00518F" />
<SolidColorBrush x:Key="buttonHover" Color="White" />
<SolidColorBrush x:Key="buttonPressed" Color="#FFD8F5DE" />
<LinearGradientBrush x:Key="Button_InnerBG" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FF65B4F1" />
<GradientStop Offset="1" Color="#FF276EA5" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="Button_InnerBG_MouseOver" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FF00F37E" />
<GradientStop Offset="1" Color="#FF008B48" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="Button_InnerBG_Press" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FF00C868" />
<GradientStop Offset="1" Color="#FF00582E" />
</LinearGradientBrush>
<SolidColorBrush x:Key="buttonNormal_Unable" Color="#FFD2D2D2" />
<SolidColorBrush x:Key="buttonBorder_Unable" Color="#FF9D9D9D" />
<LinearGradientBrush x:Key="Button_InnerBG_Unable" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFD2D2D2" />
<GradientStop Offset="1" Color="#FFB2B2B2" />
</LinearGradientBrush>
<Style TargetType="Button">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Background" Value="{StaticResource buttonNormal}" />
<Setter Property="Foreground" Value="{StaticResource buttonForground}" />
<Setter Property="BorderBrush" Value="{StaticResource buttonBorder}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Margin" Value="5" />
<Setter Property="FontFamily" Value="Arial,SimSun" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Height" Value="40" />
<Setter Property="Width" Value="100" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border
x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="6"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
<Grid>
<Border
x:Name="Inner_BG"
Margin="2"
Background="{StaticResource Button_InnerBG}"
CornerRadius="4" />
<ContentPresenter
x:Name="contentPresenter"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Focusable="False"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
<ContentPresenter.Effect>
<DropShadowEffect
BlurRadius="0"
Direction="135"
ShadowDepth="1"
Color="Black" />
</ContentPresenter.Effect>
</ContentPresenter>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="Background" Value="{StaticResource buttonHover}" />
<Setter TargetName="Inner_BG" Property="Background" Value="{StaticResource Button_InnerBG_MouseOver}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="border" Property="Background" Value="{StaticResource buttonPressed}" />
<Setter TargetName="Inner_BG" Property="Background" Value="{StaticResource Button_InnerBG_Press}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="border" Property="Background" Value="{StaticResource buttonNormal_Unable}" />
<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource buttonBorder_Unable}" />
<Setter TargetName="Inner_BG" Property="Background" Value="{StaticResource Button_InnerBG_Unable}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
<Setter TargetName="contentPresenter" Property="Effect">
<Setter.Value>
<DropShadowEffect
BlurRadius="0"
Direction="135"
Opacity="0"
ShadowDepth="1"
Color="Black" />
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--<Style TargetType="Button">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Foreground" Value="#FF181C1F" />
<Setter Property="Background" Value="CadetBlue" />
<Setter Property="BorderBrush" Value="Blue" />
<Setter Property="Margin" Value="5"/>
<Setter Property="FontFamily" Value="Arial,SimSun" />
<Setter Property="FontSize" Value="15"/>
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Height" Value="40"></Setter>
<Setter Property="Width" Value="100"></Setter>
<Setter Property="BitmapEffect" >
<Setter.Value>
<BevelBitmapEffect BevelWidth="2" />
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="Green" />
</Trigger>
-->
<!-- When the mouse is pressed, apply a bevel with a narrower BevelWidth to make the button appear to get pressed. -->
<!--
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" Value="#FFEEFDFC" />
<Setter Property="BitmapEffect" >
<Setter.Value>
<BevelBitmapEffect BevelWidth="3" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>-->
<!-- 主窗口样式 -->
<!-- 右下角 -->
<Style x:Key="NavUpButton" TargetType="Button">
<Setter Property="Height" Value="37" />
<Setter Property="Width" Value="34" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ButtonBase">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter
Margin="{TemplateBinding Control.Padding}"
HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
Content="{TemplateBinding ContentControl.Content}"
ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/上一个.png" />
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/上一个_悬停.png" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/上一个_点击.png" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="NavBackButton" TargetType="Button">
<Setter Property="Height" Value="37" />
<Setter Property="Width" Value="34" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ButtonBase">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter
Margin="{TemplateBinding Control.Padding}"
HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
Content="{TemplateBinding ContentControl.Content}"
ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/下一个.png" />
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/下一个_悬停.png" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/下一个_点击.png" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="MainButton" TargetType="Button">
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Foreground" Value="#FF004294" />
<Setter Property="BorderBrush" Value="Blue" />
<Setter Property="Margin" Value="5" />
<Setter Property="FontFamily" Value="Arial,SimSun" />
<Setter Property="FontSize" Value="22" />
<Setter Property="Height" Value="45" />
<Setter Property="Width" Value="160" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ButtonBase">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter
Margin="{TemplateBinding Control.Padding}"
HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
Content="{TemplateBinding ContentControl.Content}"
ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮.png" />
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮_悬停.png" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮_点击.png" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<!-- 右上角 -->
<Style x:Key="MainMiddleButton" TargetType="Button">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Foreground" Value="#FF004294" />
<Setter Property="BorderBrush" Value="Blue" />
<Setter Property="Margin" Value="5" />
<Setter Property="FontFamily" Value="Arial,SimSun" />
<Setter Property="FontSize" Value="15" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Height" Value="28" />
<Setter Property="Width" Value="83" />
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/事件按钮.png" />
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/事件按钮_悬停.png" />
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/事件按钮_点击.png" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<!-- 按钮缩放多用于PM气流图等界面 -->
<Style x:Key="SmallButton" TargetType="Button">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Foreground" Value="#FF181C1F" />
<Setter Property="Background" Value="CadetBlue" />
<Setter Property="BorderBrush" Value="Blue" />
<Setter Property="Margin" Value="5" />
<Setter Property="FontFamily" Value="Arial,SimSun" />
<Setter Property="FontSize" Value="14" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Height" Value="23" />
<Setter Property="Width" Value="65" />
<Setter Property="BitmapEffect">
<Setter.Value>
<BevelBitmapEffect BevelWidth="2" />
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="Green" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="BitmapEffect">
<Setter.Value>
<BevelBitmapEffect BevelWidth="3" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<!-- 反应腔盖 -->
<Style x:Key="ReactorMiniButtonStyle" TargetType="Button">
<Setter Property="FontSize" Value="15" />
<Setter Property="Focusable" Value="False" />
<Setter Property="Cursor" Value="Hand" />
</Style>
<!-- Main Menu Button -->
<SolidColorBrush x:Key="Menu_Main_BD" Color="#FFcacaca" />
<SolidColorBrush x:Key="Menu_Main_BG" Color="#FF0C1F6B" />
<SolidColorBrush x:Key="Menu_Main_BG_Highlight" Color="#FF2DACCB" />
<SolidColorBrush x:Key="Menu_Main_BG_Outer" Color="#FFCACACA" />
<SolidColorBrush x:Key="Menu_Main_BG_Inner" Color="#FF346294" />
<SolidColorBrush x:Key="Menu_Main_FG" Color="White" />
<SolidColorBrush x:Key="Menu_Main_Selected_FG" Color="#FF0b1f74" />
<!-- Login Button -->
<SolidColorBrush x:Key="LoginButton_Outer_BD" Color="#FF064081" />
<SolidColorBrush x:Key="LoginButton_Outer_BG" Color="#FFD0F5FF" />
<SolidColorBrush x:Key="LoginButton_Inner_BD" Color="#FF0D315A" />
<LinearGradientBrush x:Key="LoginButton_Inner_BG" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="1" Color="#FF1358A3" />
<GradientStop Offset="0.5" Color="#FF003C7E" />
<GradientStop Color="#FF458DDC" />
</LinearGradientBrush>
<SolidColorBrush x:Key="LoginButton_Inner_BD_Highlight" Color="#FF006032" />
<LinearGradientBrush x:Key="LoginButton_Inner_BG_Highlight" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="1" Color="#FF00C481" />
<GradientStop Offset="0.5" Color="#FF00B46E" />
<GradientStop Color="#FF00FF84" />
</LinearGradientBrush>
<Style x:Key="LoginButton" TargetType="Button">
<Setter Property="Cursor" Value="Hand" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource FG_White}" />
<Setter Property="BorderBrush" Value="{StaticResource LoginButton_Inner_BD}" />
<Setter Property="Background" Value="{DynamicResource LoginButton_Inner_BG}" />
<Setter Property="Border.CornerRadius" Value="6" />
<Setter Property="FontFamily" Value="Arial,SimSun" />
<Setter Property="FontSize" Value="18" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Height" Value="40" />
<Setter Property="Width" Value="120" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ButtonBase">
<Border
Padding="3"
Background="{DynamicResource LoginButton_Outer_BG}"
BorderBrush="{DynamicResource LoginButton_Outer_BD}"
BorderThickness="1"
CornerRadius="8">
<Border
x:Name="InnerBG"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding Border.CornerRadius}">
<ContentPresenter
Margin="{TemplateBinding Control.Padding}"
HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
Content="{TemplateBinding ContentControl.Content}"
ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}">
<ContentPresenter.Effect>
<DropShadowEffect BlurRadius="10" ShadowDepth="0" />
</ContentPresenter.Effect>
</ContentPresenter>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="InnerBG" Property="BorderBrush" Value="{DynamicResource LoginButton_Inner_BD_Highlight}" />
<Setter TargetName="InnerBG" Property="Background" Value="{DynamicResource LoginButton_Inner_BG_Highlight}" />
</Trigger>
<!-- When the mouse is pressed, apply a bevel with a narrower BevelWidth to make the button appear to get pressed. -->
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="InnerBG" Property="BorderBrush" Value="{DynamicResource LoginButton_Inner_BD_Highlight}" />
<Setter TargetName="InnerBG" Property="Background" Value="{DynamicResource LoginButton_Inner_BG_Highlight}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>