AdornerPanel.SetAdornerMargin-Methode

Legt die angegebene angefügte AdornerMargin-Eigenschaft für das bereitgestellte Element fest.

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

Syntax

'Declaration
Public Shared Sub SetAdornerMargin ( _
    obj As DependencyObject, _
    value As Thickness _
)
public static void SetAdornerMargin(
    DependencyObject obj,
    Thickness value
)
public:
static void SetAdornerMargin(
    DependencyObject^ obj, 
    Thickness value
)
static member SetAdornerMargin : 
        obj:DependencyObject * 
        value:Thickness -> unit 
public static function SetAdornerMargin(
    obj : DependencyObject, 
    value : Thickness
)

Parameter

Beispiele

Im folgenden Codebeispiel wird gezeigt, wie mithilfe der SetAdornerMargin-Methode die Ränder für einen Adorner angegeben werden. Weitere Informationen finden Sie unter Exemplarische Vorgehensweise: Erstellen eines Entwurfszeitadorners.

' The slider extends the full width of the control it adorns.
AdornerPanel.SetAdornerHorizontalAlignment( _
    opacitySlider, _
    AdornerHorizontalAlignment.Stretch)

' Position the adorner above the control it adorns.
AdornerPanel.SetAdornerVerticalAlignment( _
    opacitySlider, _
    AdornerVerticalAlignment.OutsideTop)

' Position the adorner 5 pixels above the control. 
AdornerPanel.SetAdornerMargin( _
    opacitySlider, _
    New Thickness(0, 0, 0, 5))
// The slider extends the full width of the control it adorns.
AdornerPanel.SetAdornerHorizontalAlignment( 
    opacitySlider, 
    AdornerHorizontalAlignment.Stretch);

// Position the adorner above the control it adorns.
AdornerPanel.SetAdornerVerticalAlignment(
    opacitySlider, 
    AdornerVerticalAlignment.OutsideTop);

// Position the adorner 5 pixels above the control. 
AdornerPanel.SetAdornerMargin(
    opacitySlider, 
    new Thickness(0, 0, 0, 5));

.NET Framework-Sicherheit

Siehe auch

Referenz

AdornerPanel Klasse

Microsoft.Windows.Design.Interaction-Namespace

Weitere Ressourcen

Adorner-Architektur

Featureanbieter und Featureverbindungen