Files
HandyControl/src/Shared/HandyControlDemo_Shared/Resources/DemoTheme.cs
T
NaBian d997aee5f7 now hc styles can be referenced in window.resource
by the way, supported multiple themes at the same time, It may be related to #574
2021-05-30 01:47:30 +08:00

20 lines
621 B
C#

using System;
using System.Windows;
using HandyControl.Data;
using HandyControl.Themes;
using HandyControl.Tools;
namespace HandyControlDemo.Resources
{
public class DemoTheme : Theme
{
public override ResourceDictionary GetSkin(SkinType skinType) =>
ResourceHelper.GetSkin(typeof(App).Assembly, "Resources/Themes", skinType);
public override ResourceDictionary GetTheme() => new Lazy<ResourceDictionary>(() => new ResourceDictionary
{
Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml")
}).Value;
}
}