DockPanel::SetDock Method (UIElement^, Dock)

 
System_CAPS_noteNote

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

Sets the value of the Dock attached property to a specified element.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public:
static void SetDock(
	UIElement^ element,
	Dock dock
)

Parameters

element
Type: System.Windows::UIElement^

The element to which the attached property is written.

dock
Type: System.Windows.Controls::Dock

The needed Dock value.

The SetDock method changes the position of a child element relative to other child elements within the same container. Alignment properties, such as HorizontalAlignment, change the position of a child element relative to its parent element.

.NET Framework
Available since 3.0
Return to top
Show: