Represents a surface for rendering adorners.
Assembly: PresentationFramework (in PresentationFramework.dll)
An adorner layer is guaranteed to be at a higher Z-order than the element(s) being adorned, so adorners are always rendered on top of the adorned element.
The parent of an Adorner is the that renders the Adorner, not the element being adorned.
Anything placed in the adorner layer is rendered on top of the rest of any styles you have set. In other words, adorners are always visually on top and cannot be overridden using z-order.
This example shows how to programmatically bind an adorner to a specified UIElement.
To bind an adorner to a particular UIElement, follow these steps:
Call the static method GetAdornerLayer to get an object for the UIElement to be adorned. GetAdornerLayer walks up the visual tree, starting at the specified UIElement, and returns the first adorner layer it finds. (If no adorner layers are found, the method returns null.)
Call the Add method to bind the adorner to the target UIElement.
The following example binds a SimpleCircleAdorner (shown above) to a TextBox named myTextBox.
Using Extensible Application Markup Language (XAML) to bind an adorner to another element is currently not supported.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.