AdornerLayer.GetAdornerLayer Method (Visual)


Returns the first adorner layer in the visual tree above a specified Visual.

Namespace:   System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public static AdornerLayer GetAdornerLayer(
	Visual visual


Type: System.Windows.Media.Visual

The visual element for which to find an adorner layer.

Return Value

Type: System.Windows.Documents.AdornerLayer

An adorner layer for the specified visual, or null if no adorner layer can be found.

Exception Condition

Raised when visual is null.

This static method traverses up the visual tree starting at the specified Visual and returns the first adorner layer found.

.NET Framework
Available since 3.0
Return to top