Dela via


AdornerLayout Class

Performs the layout of an adorner on the DesignerView.

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public MustInherit Class AdornerLayout
'Usage
Dim instance As AdornerLayout
public abstract class AdornerLayout
public ref class AdornerLayout abstract
public abstract class AdornerLayout

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.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.Interaction.AdornerLayout

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

AdornerLayout Members

Microsoft.Windows.Design.Interaction Namespace

AdornerPanel

PrimarySelectionAdornerProvider

Other Resources

Walkthrough: Creating a Design-time Adorner

Adorner Architecture