Export (0) Print
Expand All

FrameworkElement.GetLayoutClip Method

Returns a geometry for a clipping mask. The mask applies if the layout system attempts to arrange an element that is larger than the available display space.

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

protected override Geometry GetLayoutClip(
	Size layoutSlotSize
)

Parameters

layoutSlotSize
Type: System.Windows.Size

The size of the part of the element that does visual presentation.

Return Value

Type: System.Windows.Media.Geometry
The clipping geometry.

Margins will be subtracted from the layoutSlotSize as part of layout system behavior.

A returned null reference indicates that no clipping will occur. The default implementation always returns null when ClipToBounds is false. This method overrides UIElement.GetLayoutClip. The FrameworkElement implementation uses MaxHeight and MaxWidth in its calculations. Several subclasses of FrameworkElement override this method again. Adorner.GetLayoutClip, overrides to always return null because adorners are often deliberately outside the ordinary bounds. Canvas.GetLayoutClip and InkPresenter.GetLayoutClip return null if ClipToBounds is false.

Notes to Inheritors

The default implementation always returns null when ClipToBounds is false. Overrides are generally expected to preserve this behavior, although there are exceptions, depending on the relationship and purpose of the derived class and its layout logic as opposed to the base class.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft