Browse Source

Added IsAttachedToVisualTree extension method.

pull/9553/head
Steven Kirk 3 years ago
parent
commit
fb9fc1935e
  1. 5
      src/Avalonia.Base/VisualTree/VisualExtensions.cs

5
src/Avalonia.Base/VisualTree/VisualExtensions.cs

@ -378,6 +378,11 @@ namespace Avalonia.VisualTree
return visual as IRenderRoot ?? visual.VisualRoot;
}
/// <summary>
/// Returns a value indicating whether this control is attached to a visual root.
/// </summary>
public static bool IsAttachedToVisualTree(this Visual visual) => visual.IsAttachedToVisualTree;
/// <summary>
/// Tests whether an <see cref="Visual"/> is an ancestor of another visual.
/// </summary>

Loading…
Cancel
Save