delete lazy code in viewmodels

This commit is contained in:
NaBian committed 2021-06-21 21:49:43 +08:00
1 parent 066cedeb73
commit 700f54ab2b
23 files changed
+141 -214

No files matched your search

@@ -214,7 +214,13 @@ namespace HandyControl.Themes
private void UpdateSkin() => MergedDictionaries[0] = GetSkin(Skin);
public virtual ResourceDictionary GetTheme() => ResourceHelper.GetTheme();
private ResourceDictionary _theme;
public virtual ResourceDictionary GetTheme()
{
_theme ??= ResourceHelper.GetTheme();
return _theme;
}
private void InitResource()
{
@@ -231,6 +237,6 @@ namespace HandyControl.Themes
public class StandaloneTheme : Theme
{
public override ResourceDictionary GetTheme() => ResourceHelper.GetTheme(true);
public override ResourceDictionary GetTheme() => ResourceHelper.GetTheme();
}
}