From ff7588d346cac3fa928346a9ec39abec8c36a253 Mon Sep 17 00:00:00 2001 From: Damien Guard Date: Mon, 15 Feb 2016 02:22:33 -0800 Subject: [PATCH] Make splash/loading window draggable --- src/Update/AnimatedGifWindow.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Update/AnimatedGifWindow.cs b/src/Update/AnimatedGifWindow.cs index ee718ea96..b133cca89 100644 --- a/src/Update/AnimatedGifWindow.cs +++ b/src/Update/AnimatedGifWindow.cs @@ -1,19 +1,15 @@ #if !MONO using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Reflection; -using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; +using System.Windows.Input; using System.Windows.Media; -using System.Windows.Media.Effects; using System.Windows.Media.Imaging; using System.Windows.Shell; -using System.Windows.Threading; using WpfAnimatedGif; namespace Squirrel.Update @@ -89,6 +85,12 @@ public static void ShowWindow(TimeSpan initialDelay, CancellationToken token, Pr thread.SetApartmentState(ApartmentState.STA); thread.Start(); } + + protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) + { + base.OnMouseLeftButtonDown(e); + this.DragMove(); + } } }