From 1270aaf9eac23a03ee8e8ec6ceb9fc6cae6d6c65 Mon Sep 17 00:00:00 2001 From: Roy Date: Sat, 10 Mar 2018 20:05:42 +0200 Subject: Profiling and performance optimizations.. --- .../MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs index 36ee95f10..c4d9b4a28 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs @@ -10,7 +10,9 @@ using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; +using System.Windows.Interop; using System.Windows.Media; +using System.Windows.Media.Animation; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; @@ -30,6 +32,8 @@ namespace Tango.MachineStudio.UI public MainWindow() { + //Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata { DefaultValue = 40 }); + try { InitializeComponent(); @@ -42,6 +46,15 @@ namespace Tango.MachineStudio.UI { LogManager.Log(ex); } + + this.Loaded += MainWindow_Loaded; + } + + private void MainWindow_Loaded(object sender, RoutedEventArgs e) + { + //HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource; + //HwndTarget hwndTarget = hwndSource.CompositionTarget; + //hwndTarget.RenderMode = RenderMode.SoftwareOnly; } private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) -- cgit v1.3.1