optimized demo start-up speed
This commit is contained in:
1 parent
b57e6e8961
commit
aa745e32b1
14 files changed
+116
-69
No files matched your search
@@ -8,7 +8,6 @@ using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Navigation;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Properties.Langs;
|
||||
|
||||
@@ -38,7 +37,7 @@ namespace HandyControl.Tools
|
||||
}
|
||||
}
|
||||
|
||||
public void SetSystemVersionInfo(SystemVersionInfo info) => BlurWindow.SystemVersionInfo = info;
|
||||
public SystemVersionInfo SystemVersionInfo { get; set; }
|
||||
|
||||
public void SetLang(string lang)
|
||||
{
|
||||
@@ -49,7 +48,7 @@ namespace HandyControl.Tools
|
||||
|
||||
public void SetConfig(HandyControlConfig config)
|
||||
{
|
||||
SetSystemVersionInfo(config.SystemVersionInfo);
|
||||
SystemVersionInfo = config.SystemVersionInfo;
|
||||
SetLang(config.Lang);
|
||||
SetTimelineFrameRate(config.TimelineFrameRate);
|
||||
}
|
||||
@@ -60,10 +59,10 @@ namespace HandyControl.Tools
|
||||
public void SetWindowDefaultStyle(object resourceKey = null)
|
||||
{
|
||||
var metadata = resourceKey == null
|
||||
? new FrameworkPropertyMetadata(Application.Current.FindResource(typeof(System.Windows.Window)))
|
||||
? new FrameworkPropertyMetadata(Application.Current.FindResource(typeof(Window)))
|
||||
: new FrameworkPropertyMetadata(Application.Current.FindResource(resourceKey));
|
||||
|
||||
FrameworkElement.StyleProperty.OverrideMetadata(typeof(System.Windows.Window), metadata);
|
||||
FrameworkElement.StyleProperty.OverrideMetadata(typeof(Window), metadata);
|
||||
}
|
||||
|
||||
public void SetNavigationWindowDefaultStyle(object resourceKey = null)
|
||||
|
||||
Reference in new issue
Block a user