From ffc47f572fd5018e0b1523c106cd5b12c37c9e99 Mon Sep 17 00:00:00 2001 From: Dong Bin Date: Fri, 28 Mar 2025 11:52:23 +0800 Subject: [PATCH] misc: update comment. --- src/Ursa/Controls/Notification/WindowNotificationManager.cs | 6 ++++++ .../Controls/NotificationShared/WindowMessageManager.cs | 6 ------ src/Ursa/Controls/Toast/WindowToastManager.cs | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Ursa/Controls/Notification/WindowNotificationManager.cs b/src/Ursa/Controls/Notification/WindowNotificationManager.cs index 21063ad..3613076 100644 --- a/src/Ursa/Controls/Notification/WindowNotificationManager.cs +++ b/src/Ursa/Controls/Notification/WindowNotificationManager.cs @@ -70,6 +70,12 @@ public class WindowNotificationManager : WindowMessageManager, INotificationMana VerticalAlignmentProperty.OverrideDefaultValue(VerticalAlignment.Stretch); } + /// + /// Tries to get the from a . + /// + /// A that is either a or a . + /// The existing if found, or null if not found. + /// True if a is found; otherwise, false. public static bool TryGetNotificationManager(Visual? visual, out WindowNotificationManager? manager) { manager = visual?.FindDescendantOfType(); diff --git a/src/Ursa/Controls/NotificationShared/WindowMessageManager.cs b/src/Ursa/Controls/NotificationShared/WindowMessageManager.cs index aa8c6d6..196566b 100644 --- a/src/Ursa/Controls/NotificationShared/WindowMessageManager.cs +++ b/src/Ursa/Controls/NotificationShared/WindowMessageManager.cs @@ -84,12 +84,6 @@ public abstract class WindowMessageManager : TemplatedControl } } - public static bool TryGetMessageManager(Visual? visual, out WindowMessageManager? manager) - { - manager = visual?.FindDescendantOfType(); - return manager is not null; - } - protected void TopLevelOnTemplateApplied(object? sender, TemplateAppliedEventArgs e) { if (Parent is AdornerLayer adornerLayer) diff --git a/src/Ursa/Controls/Toast/WindowToastManager.cs b/src/Ursa/Controls/Toast/WindowToastManager.cs index 603cd5e..a2b037a 100644 --- a/src/Ursa/Controls/Toast/WindowToastManager.cs +++ b/src/Ursa/Controls/Toast/WindowToastManager.cs @@ -35,6 +35,12 @@ public class WindowToastManager : WindowMessageManager, IToastManager { } + /// + /// Tries to get the from a or . + /// + /// A that is either a or a . + /// The existing if found, or null if not found. + /// True if a is found; otherwise, false. public static bool TryGetToastManager(Visual? visual, out WindowToastManager? manager) { manager = visual?.FindDescendantOfType();