FrameworkElement.ArrangeOverride(Size) 方法

定义

在派生类中重写时,为 FrameworkElement 派生类定位子元素并确定大小。When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.

protected:
 virtual System::Windows::Size ArrangeOverride(System::Windows::Size finalSize);
protected virtual System.Windows.Size ArrangeOverride (System.Windows.Size finalSize);
abstract member ArrangeOverride : System.Windows.Size -> System.Windows.Size
override this.ArrangeOverride : System.Windows.Size -> System.Windows.Size
Protected Overridable Function ArrangeOverride (finalSize As Size) As Size

参数

finalSize
Size

父级中应使用此元素排列自身及其子元素的最终区域。The final area within the parent that this element should use to arrange itself and its children.

返回

使用的实际大小。The actual size used.

继承者说明

要自定义布局处理过程的控件作者应重写此方法。Control authors who want to customize the arrange pass of layout processing should override this method. 实现模式应在每个可见的子元素上调用 Arrange(Rect),并为每个子元素传递最终所需大小作为 finalRect 参数。The implementation pattern should call Arrange(Rect) on each visible child element, and pass the final desired size for each child element as the finalRect parameter. 父元素应该对每个子元素调用 Arrange(Rect),否则不会呈现子元素。Parent elements should call Arrange(Rect) on each child, otherwise the child elements will not be rendered.

许多派生类提供此方法的实现。Many derived classes offer implementations of this method. 主要包括: ArrangeOverride(Size)ArrangeOverride(Size)ArrangeOverride(Size)Prominent ones include: ArrangeOverride(Size), ArrangeOverride(Size) and ArrangeOverride(Size).

适用于

另请参阅