Export (0) Print
Expand All

AdornerLayer.GetAdornerLayer Method

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
)

Parameters

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.

ExceptionCondition
ArgumentNullException

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft