optimized performance
This commit is contained in:
1 parent
e1a07c0acc
commit
e9a7123398
16 files changed
+239
-190
No files matched your search
@@ -6,6 +6,7 @@ using System.Runtime.CompilerServices;
|
||||
#endif
|
||||
using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media.Animation;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
|
||||
@@ -50,8 +51,12 @@ namespace HandyControl.Tools
|
||||
{
|
||||
SetSystemVersionInfo(config.SystemVersionInfo);
|
||||
SetLang(config.Lang);
|
||||
SetTimelineFrameRate(config.TimelineFrameRate);
|
||||
}
|
||||
|
||||
public void SetTimelineFrameRate(int rate) =>
|
||||
Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata(rate));
|
||||
|
||||
public void SetWindowDefaultStyle(object resourceKey = null)
|
||||
{
|
||||
var metadata = resourceKey == null
|
||||
|
||||
@@ -148,5 +148,7 @@ namespace HandyControl.Tools
|
||||
public static IntPtr CreateHandle() => new WindowInteropHelper(new Window()).EnsureHandle();
|
||||
|
||||
public static IntPtr GetHandle(this Window window) => new WindowInteropHelper(window).EnsureHandle();
|
||||
|
||||
public static HwndSource GetHwndSource(this Window window) => HwndSource.FromHwnd(window.GetHandle());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user