UIElement.GetLayoutClip(Size) 方法

定义

返回一个替代剪辑几何图形,它表示将 ClipToBounds 设置为 true 时要剪辑的区域。Returns an alternative clipping geometry that represents the region that would be clipped if ClipToBounds were set to true.

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

参数

layoutSlotSize
Size

元素提供的可用大小。The available size provided by the element.

返回

可能的剪辑几何图形。The potential clipping geometry.

注解

默认实现将返回合法值,但不会在其计算中使用 layoutSlotSize 参数。The default implementation will return a legitimate value, but does not use the layoutSlotSize parameter in its calculations. 相反,它使用 RenderSize的值。Instead it uses the value of RenderSize.

此方法由直接派生的 FrameworkElement 类大幅重写,并且 FrameworkElement 重写为常规 WPF 框架级别元素生成更复杂的行为。This method is substantially overridden by the immediately derived FrameworkElement class, and the FrameworkElement override produces a more sophisticated behavior for general WPF framework-level elements. 有关详细信息,请参阅 FrameworkElement.GetLayoutClipFor details, see FrameworkElement.GetLayoutClip.

适用于

另请参阅