1 Star 0 Fork 0

济南千羽燕信息科技有限公司/WebP转换助手_Image2WebP_Converter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
App.xaml 5.46 KB
一键复制 编辑 原始数据 按行查看 历史
<Application x:Class="Image2Wep.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Image2Wep"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!-- 添加转换器资源 -->
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<!-- 标题栏按钮样式 -->
<Style x:Key="TitleBarButton" TargetType="Button">
<Setter Property="Width" Value="46"/>
<Setter Property="Height" Value="32"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border"
Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFF0F0F0"
TargetName="border"/>
<Setter Property="Cursor" Value="Hand"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 关闭按钮样式 -->
<Style x:Key="CloseButton" TargetType="Button" BasedOn="{StaticResource TitleBarButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border"
Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFFF4343"
TargetName="border"/>
<Setter Property="Cursor" Value="Hand"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ModernButton样式 -->
<Style x:Key="ModernButton" TargetType="Button">
<Setter Property="Background" Value="#FF007ACC"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Padding" Value="20,10"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="5"
x:Name="border">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<Border.Effect>
<DropShadowEffect BlurRadius="8"
ShadowDepth="3"
Opacity="0.3"/>
</Border.Effect>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF2986CC"
TargetName="border"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect BlurRadius="12"
ShadowDepth="5"
Opacity="0.4"/>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Path样式 -->
<Style x:Key="TitleBarButtonPath" TargetType="Path">
<Setter Property="Stroke" Value="#FF666666"/>
<Setter Property="StrokeThickness" Value="1.5"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
</Application.Resources>
</Application>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/QYYTech/Image2WebP_Converter.git
[email protected]:QYYTech/Image2WebP_Converter.git
QYYTech
Image2WebP_Converter
WebP转换助手_Image2WebP_Converter
master

搜索帮助