72 lines
3.0 KiB
XML
72 lines
3.0 KiB
XML
<Application
|
||
x:Class="SamplePreSystemApp.App"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:local="clr-namespace:SamplePreSystemApp"
|
||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
StartupUri="AppMainView.xaml">
|
||
<Application.Resources>
|
||
<ResourceDictionary>
|
||
<ResourceDictionary.MergedDictionaries>
|
||
|
||
|
||
<materialDesign:BundledTheme
|
||
BaseTheme="Light"
|
||
PrimaryColor="Blue"
|
||
SecondaryColor="Lime" />
|
||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
|
||
|
||
|
||
<ResourceDictionary Source="pack://application:,,,/SamplePreSystem.UI;component/Styles/BaseButtonStyle.xaml" />
|
||
<!--<ResourceDictionary Source="/Styles/BaseDataGrid.xaml" />-->
|
||
<ResourceDictionary Source="pack://application:,,,/SamplePreSystem.UI;component/Styles/BaseDataGrid.xaml" />
|
||
<ResourceDictionary Source="pack://application:,,,/SamplePreSystem.UI;component/Styles/BaseWindowStyle.xaml" />
|
||
|
||
|
||
|
||
|
||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Window.xaml" />
|
||
|
||
|
||
|
||
</ResourceDictionary.MergedDictionaries>
|
||
|
||
|
||
|
||
<!-- ✅ 全局设置:表格表头样式 -->
|
||
<Style TargetType="DataGridColumnHeader">
|
||
<Setter Property="Background" Value="#F5F5F5" />
|
||
<Setter Property="Foreground" Value="#333333" />
|
||
<Setter Property="Height" Value="32" />
|
||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||
</Style>
|
||
|
||
|
||
<Style x:Key="ColorBreathStyle" TargetType="{x:Type FrameworkElement}">
|
||
<!-- 第一步:给控件默认添加一个纯色画刷(必须这样写才能做动画) -->
|
||
<Setter Property="Opacity" Value="1" />
|
||
|
||
<!-- 第二步:加载就自动播放 明暗呼吸动画 -->
|
||
<Style.Triggers>
|
||
<EventTrigger RoutedEvent="Loaded">
|
||
<BeginStoryboard>
|
||
<Storyboard>
|
||
<!-- 动画:透明度 1 → 0.2 → 1,实现 亮 → 暗 → 亮 呼吸 -->
|
||
<DoubleAnimation
|
||
AutoReverse="True"
|
||
RepeatBehavior="Forever"
|
||
Storyboard.TargetProperty="Opacity"
|
||
From="1"
|
||
To="0.2"
|
||
Duration="0:0:0.8" />
|
||
</Storyboard>
|
||
</BeginStoryboard>
|
||
</EventTrigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
|
||
|
||
</ResourceDictionary>
|
||
</Application.Resources>
|
||
</Application>
|