LayoutInformation.GetLayoutSlot Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns the layout slot, or bounding box, that contains the specified element.

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

Syntax

Public Shared Function GetLayoutSlot ( _
    element As FrameworkElement _
) As Rect
public static Rect GetLayoutSlot(
    FrameworkElement element
)

Parameters

Return Value

Type: System.Windows..::.Rect
The area assigned to the element for layout.

Remarks

The layout slot is the bounding box that defines the area that an element may occupy. If the element is smaller than the layout slot, it is positioned inside based on its alignment properties. If the element is larger than the layout slot, it is clipped. You can retrieve the visible area of that clipping by calling GetLayoutClip.

The following image shows the dimensions of a parent panel, its child element, and the layout slot that contains the child.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

LayoutInformation Class

System.Windows.Controls.Primitives Namespace