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.

傳回

Geometry

可能的裁剪幾何。The potential clipping geometry.

備註

預設的實值會傳回合法的值,但不會 layoutSlotSize 在其計算中使用參數。The default implementation will return a legitimate value, but does not use the layoutSlotSize parameter in its calculations. 相反地,它會使用的值 RenderSizeInstead 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.

適用於

另請參閱