theme switch

This commit is contained in:
NaBian 2020-12-01 23:47:19 +08:00
parent f835f25165
commit c3e4988c85
8 changed files with 13077 additions and 13148 deletions

View File

@ -192,6 +192,6 @@
</Page>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="..\..\Shared\HandyControl_Shared\Themes\XamlCombine.exe ..\..\Shared\HandyControl_Shared\Themes\Theme_GE45.txt Theme.xaml" />
<Exec Command="..\..\Shared\HandyControl_Shared\Themes\XamlCombine.exe ..\..\Shared\HandyControl_Shared\Themes\Theme_40.txt ..\..\..\Net_40\HandyControl_Net_40\Themes\Theme.xaml" />
</Target>
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDark.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="Resources/Themes/SkinDefault.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@ -9,7 +9,6 @@ using System.Runtime;
using System.Threading;
using System.Windows;
using HandyControl.Data;
using HandyControl.Themes;
using HandyControl.Tools;
using HandyControlDemo.Data;
using HandyControlDemo.Tools;
@ -91,7 +90,6 @@ namespace HandyControlDemo
internal void UpdateSkin(SkinType skin)
{
SharedResourceDictionary.SharedDictionaries.Clear();
var skins0 = Resources.MergedDictionaries[0];
skins0.MergedDictionaries.Clear();
skins0.MergedDictionaries.Add(ResourceHelper.GetSkin(skin));

View File

@ -404,12 +404,15 @@
</None>
<Page Include="$(MSBuildThisFileDirectory)Themes\Basic\Colors\Colors.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Basic\Colors\ColorsDark.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Basic\Colors\ColorsViolet.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<None Include="$(MSBuildThisFileDirectory)Themes\Basic\Converters.xaml">
<SubType>Designer</SubType>

View File

@ -1,40 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:langs="clr-namespace:HandyControl.Properties.Langs" xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:interactivity="clr-namespace:HandyControl.Interactivity" xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" xmlns:converter="clr-namespace:HandyControl.Tools.Converter" xmlns:themes="clr-namespace:HandyControl.Themes" xmlns:hc="clr-namespace:HandyControl.Controls" xmlns:tools="clr-namespace:HandyControl.Tools" xmlns:ex="clr-namespace:HandyControl.Tools.Extension" xmlns:shapes="clr-namespace:HandyControl.Expression.Shapes">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:langs="clr-namespace:HandyControl.Properties.Langs" xmlns:interactivity="clr-namespace:HandyControl.Interactivity" xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" xmlns:converter="clr-namespace:HandyControl.Tools.Converter" xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:themes="clr-namespace:HandyControl.Themes" xmlns:hc="clr-namespace:HandyControl.Controls" xmlns:tools="clr-namespace:HandyControl.Tools" xmlns:ex="clr-namespace:HandyControl.Tools.Extension" xmlns:shapes="clr-namespace:HandyControl.Expression.Shapes">
<langs:LangProvider x:Key="Langs" />
<Color x:Key="LightPrimaryColor">#f3fbff</Color>
<Color x:Key="PrimaryColor">#326cf3</Color>
<Color x:Key="DarkPrimaryColor">#326cf3</Color>
<Color x:Key="LightDangerColor">#fff6f7</Color>
<Color x:Key="DangerColor">#db3340</Color>
<Color x:Key="DarkDangerColor">#db3340</Color>
<Color x:Key="LightWarningColor">#fffcf5</Color>
<Color x:Key="WarningColor">#e9af20</Color>
<Color x:Key="DarkWarningColor">#e9af20</Color>
<Color x:Key="LightInfoColor">#f1fdff</Color>
<Color x:Key="InfoColor">#00bcd4</Color>
<Color x:Key="DarkInfoColor">#00bcd4</Color>
<Color x:Key="LightSuccessColor">#f3fff6</Color>
<Color x:Key="SuccessColor">#2db84d</Color>
<Color x:Key="DarkSuccessColor">#2db84d</Color>
<Color x:Key="PrimaryTextColor">#212121</Color>
<Color x:Key="SecondaryTextColor">#757575</Color>
<Color x:Key="ThirdlyTextColor">#bdbdbd</Color>
<Color x:Key="ReverseTextColor">#212121</Color>
<Color x:Key="TextIconColor">White</Color>
<Color x:Key="BorderColor">#e0e0e0</Color>
<Color x:Key="SecondaryBorderColor">#757575</Color>
<Color x:Key="BackgroundColor">#eeeeee</Color>
<Color x:Key="RegionColor">#ffffff</Color>
<Color x:Key="SecondaryRegionColor">#eeeeee</Color>
<Color x:Key="ThirdlyRegionColor">White</Color>
<Color x:Key="TitleColor">#326cf3</Color>
<Color x:Key="SecondaryTitleColor">#326cf3</Color>
<Color x:Key="DefaultColor">White</Color>
<Color x:Key="DarkDefaultColor">#f5f5f5</Color>
<Color x:Key="AccentColor">#f8491e</Color>
<Color x:Key="DarkAccentColor">#f8491e</Color>
<Color x:Key="DarkMaskColor">#20000000</Color>
<Color x:Key="DarkOpacityColor">#40000000</Color>
<system:UInt32 x:Key="BlurGradientValue">0x99FFFFFF</system:UInt32>
<interactivity:FluidMoveBehavior x:Key="BehaviorXY200" x:Shared="False" AppliesTo="Children" Duration="0:0:.2">
<interactivity:FluidMoveBehavior.EaseX>
<PowerEase />

View File

@ -1,5 +1,4 @@
Lang.xaml
Basic\Colors\Colors.xaml
Basic\Behaviors.xaml
Basic\Brushes.xaml
Basic\Converters.xaml

View File

@ -1,5 +1,4 @@
Lang.xaml
Basic\Colors\Colors.xaml
Basic\Behaviors.xaml
Basic\Brushes.xaml
Basic\Converters.xaml