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
)
protected Geometry GetLayoutClip (
	Size layoutSlotSize
)
protected override function GetLayoutClip (
	layoutSlotSize : Size
) : Geometry
You cannot use methods in XAML.

Parameters

layoutSlotSize

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

Return Value

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 a null reference (Nothing in Visual Basic) 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 a null reference (Nothing in Visual Basic) because adorners are often deliberately outside the ordinary bounds. Canvas.GetLayoutClip and InkPresenter.GetLayoutClip return a null reference (Nothing in Visual Basic) if ClipToBounds is false.

Notes to Inheritors: The default implementation always returns a null reference (Nothing in Visual Basic) 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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: