SetDock Method

DockPanel.SetDock Method (UIElement, Dock)


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


Type: System.Windows.UIElement

The element to which the attached property is written.

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
© 2016 Microsoft