AdornerProvider.Adorners, propriété

Mise à jour : novembre 2007

Obtient la collection d'ornements disponible avec ce fournisseur d'ornements.

Espace de noms :  Microsoft.Windows.Design.Interaction
Assembly :  Microsoft.Windows.Design.Extensibility (dans Microsoft.Windows.Design.Extensibility.dll)

Syntaxe

Public ReadOnly Property Adorners As Collection(Of UIElement)

Dim instance As AdornerProvider
Dim value As Collection(Of UIElement)

value = instance.Adorners
public Collection<UIElement> Adorners { get; }
public:
property Collection<UIElement^>^ Adorners {
    Collection<UIElement^>^ get ();
}
public function get Adorners () : Collection<UIElement>

Valeur de propriété

Type : System.Collections.ObjectModel.Collection<UIElement>

Collection d'objets UIElement qui ont des propriétés d'ornement attachées.

Notes

La collection Adorners est remplie dans votre implémentation Activate.

Exemples

L'exemple de code suivant indique comment ajouter un panneau d'ornement à la collection Adorners. Pour plus d'informations, consultez Procédure pas à pas : création d'un ornement au moment du design.

' The Panel utility property demand-creates the 
' adorner panel and adds it to the provider's 
' Adorners collection.
Public ReadOnly Property Panel() As AdornerPanel
    Get
        If Me.opacitySliderAdornerPanel Is Nothing Then
            Me.opacitySliderAdornerPanel = New AdornerPanel()

            ' Add the adorner to the adorner panel.
            Me.opacitySliderAdornerPanel.Children.Add(opacitySlider)

            ' Add the panel to the Adorners collection.
            Adorners.Add(opacitySliderAdornerPanel)
        End If

        Return Me.opacitySliderAdornerPanel
    End Get
End Property
// The Panel utility property demand-creates the 
// adorner panel and adds it to the provider's 
// Adorners collection.
public AdornerPanel Panel 
{ 
    get
    {
        if (this.opacitySliderAdornerPanel == null)
        {
            opacitySliderAdornerPanel = new AdornerPanel();

            opacitySliderAdornerPanel.Children.Add(opacitySlider);

            // Add the panel to the Adorners collection.
            Adorners.Add(opacitySliderAdornerPanel);
        }

        return this.opacitySliderAdornerPanel;
    } 
}

Autorisations

Voir aussi

Référence

AdornerProvider, classe

Membres AdornerProvider

Microsoft.Windows.Design.Interaction, espace de noms

Autres ressources

Architecture d'ornement

Espace de disposition et espace de rendu

Fournisseurs de fonctionnalités et connecteurs de fonctionnalités

Procédure pas à pas : création d'un ornement au moment du design