memory optimization
This commit is contained in:
1 parent
5afb569d11
commit
1ec8cb521c
5 files changed
+92
-36
No files matched your search
@@ -79,13 +79,20 @@ namespace HandyControl.Tools
|
||||
Source = new Uri($"pack://application:,,,/HandyControl;component/Themes/Skin{skin}.xaml")
|
||||
};
|
||||
|
||||
private static ResourceDictionary HcTheme;
|
||||
|
||||
/// <summary>
|
||||
/// get HandyControl theme
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ResourceDictionary GetTheme() => new Lazy<ResourceDictionary>(() => new ResourceDictionary
|
||||
public static ResourceDictionary GetTheme()
|
||||
{
|
||||
Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml")
|
||||
}).Value;
|
||||
HcTheme ??= new ResourceDictionary
|
||||
{
|
||||
Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml")
|
||||
};
|
||||
|
||||
return HcTheme;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user