Skip to content

Commit cacce68

Browse files
committed
Auto-close inactive flyout
1 parent c924c72 commit cacce68

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

MediaFlyout/Helpers/AnimationHelper.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ public static void ShowFlyout(FlyoutWindow window, bool topmost = false)
7979
window.IsRaising = false;
8080
window.Focus();
8181
window.Activate();
82+
83+
#if !DEBUG
84+
Task.Run(async delegate
85+
{
86+
await Task.Delay(1500);
87+
if (!window.IsFocused && window.IsVisible && !window.Tray.isClosing)
88+
{
89+
HideFlyout(window);
90+
}
91+
});
92+
#endif
8293
});
8394

8495
window.IsRaising = true;

0 commit comments

Comments
 (0)