misc: update comment.
This commit is contained in:
@@ -70,6 +70,12 @@ public class WindowNotificationManager : WindowMessageManager, INotificationMana
|
||||
VerticalAlignmentProperty.OverrideDefaultValue<WindowNotificationManager>(VerticalAlignment.Stretch);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to get the <see cref="WindowNotificationManager"/> from a <see cref="Visual"/>.
|
||||
/// </summary>
|
||||
/// <param name="visual">A <see cref="Visual"/> that is either a <see cref="Window"/> or a <see cref="VisualLayerManager"/>.</param>
|
||||
/// <param name="manager">The existing <see cref="WindowNotificationManager"/> if found, or null if not found.</param>
|
||||
/// <returns>True if a <see cref="WindowNotificationManager"/> is found; otherwise, false.</returns>
|
||||
public static bool TryGetNotificationManager(Visual? visual, out WindowNotificationManager? manager)
|
||||
{
|
||||
manager = visual?.FindDescendantOfType<WindowNotificationManager>();
|
||||
|
||||
@@ -84,12 +84,6 @@ public abstract class WindowMessageManager : TemplatedControl
|
||||
}
|
||||
}
|
||||
|
||||
public static bool TryGetMessageManager(Visual? visual, out WindowMessageManager? manager)
|
||||
{
|
||||
manager = visual?.FindDescendantOfType<WindowMessageManager>();
|
||||
return manager is not null;
|
||||
}
|
||||
|
||||
protected void TopLevelOnTemplateApplied(object? sender, TemplateAppliedEventArgs e)
|
||||
{
|
||||
if (Parent is AdornerLayer adornerLayer)
|
||||
|
||||
@@ -35,6 +35,12 @@ public class WindowToastManager : WindowMessageManager, IToastManager
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to get the <see cref="WindowToastManager"/> from a <see cref="Window"/> or <see cref="VisualLayerManager"/>.
|
||||
/// </summary>
|
||||
/// <param name="visual">A <see cref="Visual"/> that is either a <see cref="Window"/> or a <see cref="VisualLayerManager"/>.</param>
|
||||
/// <param name="manager">The existing <see cref="WindowToastManager"/> if found, or null if not found.</param>
|
||||
/// <returns>True if a <see cref="WindowToastManager"/> is found; otherwise, false.</returns>
|
||||
public static bool TryGetToastManager(Visual? visual, out WindowToastManager? manager)
|
||||
{
|
||||
manager = visual?.FindDescendantOfType<WindowToastManager>();
|
||||
|
||||
Reference in New Issue
Block a user