Método AdornerPanel.SetAdornerHorizontalAlignment

Conjuntos de AdornerHorizontalAlignment anexado a propriedade elemento fornecido.

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

Sintaxe

'Declaração
Public Shared Sub SetAdornerHorizontalAlignment ( _
    obj As DependencyObject, _
    value As AdornerHorizontalAlignment _
)
public static void SetAdornerHorizontalAlignment(
    DependencyObject obj,
    AdornerHorizontalAlignment value
)
public:
static void SetAdornerHorizontalAlignment(
    DependencyObject^ obj, 
    AdornerHorizontalAlignment value
)
static member SetAdornerHorizontalAlignment : 
        obj:DependencyObject * 
        value:AdornerHorizontalAlignment -> unit 
public static function SetAdornerHorizontalAlignment(
    obj : DependencyObject, 
    value : AdornerHorizontalAlignment
)

Parâmetros

Exemplos

O exemplo de código a seguir mostra como usar o SetAdornerHorizontalAlignment método para especificar o alinhamento horizontal para um adorno. For more information, see Walkthrough: Criando um adorno em tempo de design.

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

Segurança do .NET Framework

Consulte também

Referência

AdornerPanel Classe

Namespace Microsoft.Windows.Design.Interaction

Outros recursos

Adorner de arquitetura

Recurso provedores e conectores de recursos