BehaviorService.Adorners Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Namespace:   System.Windows.Forms.Design.Behavior
Assembly:  System.Design (in System.Design.dll)

public BehaviorServiceAdornerCollection Adorners { get; }

The Adorners property provides access to the BehaviorServiceAdornerCollection managed by the BehaviorService.

The following code example demonstrates how to add Adorner objects to and remove them from a BehaviorServiceAdornerCollection. This code example is part of a larger example provided for the BehaviorService class.

class MyDesigner : ControlDesigner
    private Adorner myAdorner;

    protected override void Dispose(bool disposing)
        if (disposing && myAdorner != null)
            BehaviorService b = BehaviorService;
            if (b != null)

    public override void Initialize(IComponent component)

        // Add the custom set of glyphs using the BehaviorService. 
        // Glyphs live on adornders.
        myAdorner = new Adorner();
        myAdorner.Glyphs.Add(new MyGlyph(BehaviorService, Control));

.NET Framework
Available since 2.0
Return to top