Skip to main content
FrameworkElementGetLayoutClip 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
virtual Geometry^ GetLayoutClip(
	Size layoutSlotSize
) override
override GetLayoutClip : 
        layoutSlotSize:Size -> Geometry
Protected Overrides Function GetLayoutClip (
	layoutSlotSize As Size
) As Geometry



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 null when is false. This method overrides UIElementGetLayoutClip. The FrameworkElement implementation uses and in its calculations. Several subclasses of FrameworkElement override this method again. AdornerGetLayoutClip, overrides to always return null because adorners are often deliberately outside the ordinary bounds. CanvasGetLayoutClip and InkPresenterGetLayoutClip return null if is false.

Notes to Inheritors:

The default implementation always returns null when 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
Available since 3.0
Return to top