From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点
---
HMI.UI/Style/WindowResources.xaml | 82 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/HMI.UI/Style/WindowResources.xaml b/HMI.UI/Style/WindowResources.xaml
new file mode 100644
index 0000000..bd5f6c2
--- /dev/null
+++ b/HMI.UI/Style/WindowResources.xaml
@@ -0,0 +1,82 @@
+锘�<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:ui="clr-namespace:HMI.UI"
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
+ >
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+
+ <Style x:Key="WindowButton" TargetType="Button">
+ <Setter Property="Background" Value="{DynamicResource PrimaryColor}"/>
+ <Setter Property="ui:DpPlugin.HoverColor" Value="{DynamicResource SecondPrimaryColor}"/>
+ <Setter Property="FontFamily" Value="{StaticResource iconfont}"/>
+ <Setter Property="FontWeight" Value="SemiBold"/>
+ <Setter Property="Foreground" Value="White"/>
+ <Setter Property="Width" Value="50"/>
+ <Setter Property="FontSize" Value="20"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="BorderBrush" Value="Transparent"/>
+ <Setter Property="Cursor" Value="Hand"/>
+ <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True"/>
+
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <Border x:Name="border" Width="{TemplateBinding Width}" Background="{TemplateBinding Background}"
+ BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
+ <Label x:Name="label" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
+ HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
+ Foreground="{TemplateBinding Foreground}"
+ Content="{TemplateBinding Content}"/>
+ </Border>
+
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter TargetName="border" Property="Background" Value="{Binding
+ Path=(ui:DpPlugin.HoverColor),RelativeSource={RelativeSource TemplatedParent}}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="WindowCloseButton" BasedOn="{StaticResource WindowButton}" TargetType="Button">
+ <Setter Property="ui:DpPlugin.HoverColor" Value="Red"/>
+ </Style>
+
+ <Style x:Key="ChildWindowButton" BasedOn="{StaticResource WindowButton}" TargetType="Button">
+ <Setter Property="FontSize" Value="15"/>
+ <Setter Property="Width" Value="30"/>
+ <Setter Property="Background" Value="{DynamicResource SecondPrimaryColor}"/>
+ <Setter Property="ui:DpPlugin.HoverColor" Value="{DynamicResource PrimaryColor}"/>
+ </Style>
+
+ <Style x:Key="ChildWindowCloseButton" BasedOn="{StaticResource ChildWindowButton}" TargetType="Button">
+ <Setter Property="ui:DpPlugin.HoverColor" Value="Red"/>
+ </Style>
+
+ <Style x:Key="LinkButton" TargetType="Button">
+ <Setter Property="ui:DpPlugin.HoverColor" Value="{DynamicResource SecondPrimaryColor}"/>
+ <Setter Property="FontFamily" Value="{StaticResource iconfont}"/>
+ <Setter Property="Foreground" Value="{DynamicResource SecondPrimaryColor}"/>
+
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <TextBlock Style="{x:Null}" x:Name="label" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
+ Foreground="{TemplateBinding Foreground}"
+ Text="{TemplateBinding Content}"/>
+
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter TargetName="label" Property="Foreground" Value="{Binding
+ Path=(ui:DpPlugin.HoverColor),RelativeSource={RelativeSource TemplatedParent}}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</ResourceDictionary>
\ No newline at end of file
--
Gitblit v1.9.1