AdornerLayout Class
Performs the layout of an adorner on the DesignerView.
Inheritance Hierarchy
System.Object
Microsoft.Windows.Design.Interaction.AdornerLayout
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public MustInherit Class AdornerLayout
public abstract class AdornerLayout
public ref class AdornerLayout abstract
[<AbstractClass>]
type AdornerLayout = class end
public abstract class AdornerLayout
The AdornerLayout type exposes the following members.
Constructors
Name | Description | |
---|---|---|
AdornerLayout | Initializes a new instance of the AdornerLayout class. |
Top
Methods
Name | Description | |
---|---|---|
AdornerPropertyChanged | Invoked on the adorner layout whenever one of the properties stored in the AdornerProperties class changes. | |
Arrange | Performs the layout arrangement on the specified adorner. | |
ArrangeChildren | Performs the layout arrangement on the AdornerPanel. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
EvaluateLayout | Gets a value indicating whether the adorner remains in the UI tree. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsAssociated | Gets a value indicating whether the specified model item is associated with this adorner. | |
Measure | Performs the layout measurement on the specified adorner. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
In most Windows Presentation Foundation (WPF) UI trees, layout occurs top-down through the Arrange and Measure methods. Adorners cannot directly take advantage of this because an adorner is typically laying itself out relative to an element that is not a direct child or parent. Some complex adorners even have to calculate their size and position based on the positions of several other elements, something WPF cannot do.
The AdornerLayout class is designed to improve this. Every time the layout is updated in EvaluateLayout, the AdornerLayout’s EvaluateLayout method is called. This method should determine whether the adorner has to be re-measured or re-arranged, and call the appropriate InvalidateMeasure or InvalidateArrange methods on the adorner.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace
PrimarySelectionAdornerProvider