次の方法で共有


AdornerProvider.Adorners プロパティ

更新 : 2007 年 11 月

この装飾プロバイダによって提供される装飾のコレクションを取得します。

名前空間 :  Microsoft.Windows.Design.Interaction
アセンブリ :  Microsoft.Windows.Design.Extensibility (Microsoft.Windows.Design.Extensibility.dll 内)

構文

'宣言
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>

プロパティ値

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

装飾の添付プロパティを持つ UIElement オブジェクトのコレクション。

解説

Adorners コレクションは、Activate の実装内で作成されます。

装飾パネルを Adorners コレクションに追加する方法を次のコード例に示します。詳細については、「チュートリアル : デザイン時装飾の作成」を参照してください。

' 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;
    } 
}

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

AdornerProvider クラス

AdornerProvider メンバ

Microsoft.Windows.Design.Interaction 名前空間

その他の技術情報

装飾アーキテクチャ

レイアウト空間と描画空間

機能プロバイダと機能コネクタ

チュートリアル : デザイン時装飾の作成