Skip to main content
.NET Framework Class Library
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)
Syntax
Protected Overrides Function GetLayoutClip ( _
	layoutSlotSize As [%$TOPIC/ms598129_en-us_VS_110_1_0_0_0_0%] _
) As [%$TOPIC/ms598129_en-us_VS_110_1_0_0_0_1%]
protected override [%$TOPIC/ms598129_en-us_VS_110_1_0_1_0_0%] GetLayoutClip(
	[%$TOPIC/ms598129_en-us_VS_110_1_0_1_0_1%] layoutSlotSize
)
protected:
virtual [%$TOPIC/ms598129_en-us_VS_110_1_0_2_0_0%]^ GetLayoutClip(
	[%$TOPIC/ms598129_en-us_VS_110_1_0_2_0_1%] layoutSlotSize
) override
abstract GetLayoutClip : 
        layoutSlotSize:[%$TOPIC/ms598129_en-us_VS_110_1_0_3_0_0%] -> [%$TOPIC/ms598129_en-us_VS_110_1_0_3_0_1%]  
override GetLayoutClip : 
        layoutSlotSize:[%$TOPIC/ms598129_en-us_VS_110_1_0_3_0_2%] -> [%$TOPIC/ms598129_en-us_VS_110_1_0_3_0_3%]
protected override function GetLayoutClip(
	layoutSlotSize : [%$TOPIC/ms598129_en-us_VS_110_1_0_4_0_0%]
) : [%$TOPIC/ms598129_en-us_VS_110_1_0_4_0_1%]

Parameters

layoutSlotSize
Type: System.WindowsSize

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

Return Value

Type: System.Windows.MediaGeometry
The clipping geometry.
Remarks

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

Notes to Inheritors

The default implementation always returns 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.

Version Information

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1