FrameworkElement.GetLayoutClip(Size) FrameworkElement.GetLayoutClip(Size) FrameworkElement.GetLayoutClip(Size) FrameworkElement.GetLayoutClip(Size) 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.

protected:
 override System::Windows::Media::Geometry ^ GetLayoutClip(System::Windows::Size layoutSlotSize);
protected override System.Windows.Media.Geometry GetLayoutClip (System.Windows.Size layoutSlotSize);
override this.GetLayoutClip : System.Windows.Size -> System.Windows.Media.Geometry
Protected Overrides Function GetLayoutClip (layoutSlotSize As Size) As Geometry

参数

layoutSlotSize
Size Size Size Size

执行可视化演示的元素的部分大小。The size of the part of the element that does visual presentation.

返回

剪切形状。The clipping geometry.

注解

作为布局系统行为的一部分layoutSlotSize , 将从中减去边距。Margins will be subtracted from the layoutSlotSize as part of layout system behavior.

返回的空引用指示将不会进行剪辑。A returned null reference indicates that no clipping will occur. 当为nullfalse, 默认实现始终返回。 ClipToBoundsThe default implementation always returns null when ClipToBounds is false. 此方法重写 UIElement.GetLayoutClipThis method overrides UIElement.GetLayoutClip. 实现在其MaxHeight计算中使用和MaxWidthFrameworkElementThe FrameworkElement implementation uses MaxHeight and MaxWidth in its calculations. 若干子类FrameworkElement重写此方法。Several subclasses of FrameworkElement override this method again. Adorner.GetLayoutClip, 重写始终返回null , 因为装饰器通常特意位于普通边界之外。Adorner.GetLayoutClip, overrides to always return null because adorners are often deliberately outside the ordinary bounds. Canvas.GetLayoutClip如果InkPresenter.GetLayoutClipClipToBounds , 则返回nullfalseCanvas.GetLayoutClip and InkPresenter.GetLayoutClip return null if ClipToBounds is false.

继承者说明

当为nullfalse, 默认实现始终返回。 ClipToBoundsThe 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.

适用于

另请参阅