From 8c48cdf0a978dbf1c43a3d986b52c975fbe4cbd8 Mon Sep 17 00:00:00 2001 From: Foglio Date: Sun, 1 Oct 2023 12:00:09 +0200 Subject: [PATCH] disable appear animation on secondary windows --- TCC.Core/UI/Windows/TccWindow.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TCC.Core/UI/Windows/TccWindow.cs b/TCC.Core/UI/Windows/TccWindow.cs index 349a3cfb..93c1f6ee 100644 --- a/TCC.Core/UI/Windows/TccWindow.cs +++ b/TCC.Core/UI/Windows/TccWindow.cs @@ -55,11 +55,13 @@ public virtual void ShowWindow() Dispatcher?.InvokeAsync(() => { BeginAnimation(OpacityProperty, null); - Opacity = 0; + //((FrameworkElement)Content).BeginAnimation(OpacityProperty, null); + //((FrameworkElement)Content).Opacity = 0; + //_showAnim.From = 0; Show(); Showed?.Invoke(); RefreshTopmost(); - BeginAnimation(OpacityProperty, _showAnim); + //((FrameworkElement)Content).BeginAnimation(OpacityProperty, _showAnim); }); } @@ -78,7 +80,7 @@ protected virtual void OnClosing(object? sender, System.ComponentModel.CancelEve HideWindow(); } - protected void Drag(object sender, MouseButtonEventArgs e) + protected virtual void Drag(object sender, MouseButtonEventArgs e) { ((UIElement)Content).Opacity = .7; this.TryDragMove();