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.

 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


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.

傳回的 null 參考,表示會發生任何裁剪。A returned null reference indicates that no clipping will occur. 預設實作永遠會傳回nullClipToBoundsfalseThe default implementation always returns null when ClipToBounds is false. 這個方法覆寫 UIElement.GetLayoutClipThis method overrides UIElement.GetLayoutClip. FrameworkElement實作會使用MaxHeightMaxWidth其計算中。The 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.GetLayoutClipInkPresenter.GetLayoutClip會傳回null如果ClipToBoundsfalseCanvas.GetLayoutClip and InkPresenter.GetLayoutClip return null if ClipToBounds is false.


預設實作永遠會傳回nullClipToBoundsfalseThe 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.