이 문서는 기계 번역을 이용하여 번역되었습니다. 문서를 영문으로 보려면 영문 확인란을 선택하세요. 마우스 포인터를 텍스트 위로 이동시켜 팝업 창에서 영문 텍스트를 표시할 수도 있습니다.
번역
영문

UIElement.Arrange 메서드 (Rect)

 

게시 날짜: 2016년 11월

자식 요소를 배치하고 UIElement에 대한 크기를 결정합니다. 부모 요소는 재귀적 레이아웃 업데이트를 구성하기 위해 해당 ArrangeCore 구현(또는 WPF 프레임워크 수준)에서 이 메서드를 호출합니다. 이 메서드는 레이아웃 업데이트의 두 번째 단계를 구성합니다.

네임스페이스:   System.Windows
어셈블리:  PresentationCore(PresentationCore.dll에 있음)

public void Arrange(
	Rect finalRect
)

매개 변수

finalRect
Type: System.Windows.Rect

부모가 자식 요소에 대해 계산하는 최종 크기로, Rect 인스턴스로 제공됩니다.

For WPF framework-level element deriving scenarios, behavior for M:System.Windows.UIElement.Arrange(System.Windows.Rect) should not (and cannot, unless you shadow) be changed. Instead, you should override the M:System.Windows.FrameworkElement.ArrangeOverride(System.Windows.Size) implementation in your class. Your M:System.Windows.FrameworkElement.ArrangeOverride(System.Windows.Size) implementation is called internally by M:System.Windows.UIElement.Arrange(System.Windows.Rect) as part of default WPF framework-level layout operations. Your M:System.Windows.UIElement.ArrangeCore(System.Windows.Rect) implementation should also call M:System.Windows.FrameworkElement.ArrangeOverride(System.Windows.Size) on each child element, if it has child elements.

For WPF core-level element deriving scenarios, the behavior for M:System.Windows.UIElement.Arrange(System.Windows.Rect) should not (and cannot, unless you shadow) be changed. Instead, you should override M:System.Windows.UIElement.ArrangeCore(System.Windows.Rect) in your class. Your M:System.Windows.UIElement.ArrangeCore(System.Windows.Rect) implementation is called internally by M:System.Windows.UIElement.Arrange(System.Windows.Rect) as part of default WPF framework-level layout operations. However, this assumes you are using WPF framework-level layout and its layout system, which is often not the case if you are specifically deriving elements at the WPF core-level from the T:System.Windows.UIElement base element class. Your M:System.Windows.UIElement.ArrangeCore(System.Windows.Rect) implementation should also call M:System.Windows.UIElement.Arrange(System.Windows.Rect) on each child element, if it has child elements. Note that the WPF core-level scenario implies that you are not using a T:System.Windows.FrameworkElement derived class, because T:System.Windows.FrameworkElement seals M:System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect).

Computation of WPF framework-level layout positioning in TLA#tla_winclient consists of a M:System.Windows.UIElement.Measure(System.Windows.Size) call and an M:System.Windows.UIElement.Arrange(System.Windows.Rect) call. During the M:System.Windows.UIElement.Measure(System.Windows.Size) call, the layout system determines an element's size requirements using a provided T:System.Windows.Size (availableSize) argument. During the M:System.Windows.UIElement.Arrange(System.Windows.Rect) call, the layout system finalizes the size and position of an element's bounding box. For more information, see Layout.

availableSize can be any number from zero to infinity. Elements to be laid out return the minimum Size they require through the availableSize parameter.

When a layout is first instantiated, it always receives a M:System.Windows.UIElement.Measure(System.Windows.Size) call before M:System.Windows.UIElement.Arrange(System.Windows.Rect). However, after the first layout pass, it may receive an M:System.Windows.UIElement.Arrange(System.Windows.Rect) call without a M:System.Windows.UIElement.Measure(System.Windows.Size); this can happen when a property that affects only M:System.Windows.UIElement.Arrange(System.Windows.Rect) is changed (such as alignment), or when the parent receives an M:System.Windows.UIElement.Arrange(System.Windows.Rect) without a M:System.Windows.UIElement.Measure(System.Windows.Size). A M:System.Windows.UIElement.Measure(System.Windows.Size) call will automatically invalidate an M:System.Windows.UIElement.Arrange(System.Windows.Rect) call.

Layout updates generally occur asynchronously (at a time determined by the layout system). An element might not immediately reflect changes to properties that affect element sizing (such as P:System.Windows.FrameworkElement.Width).

System_CAPS_note참고

Layout updates can be forced by using the M:System.Windows.UIElement.UpdateLayout method; however, calling this function is not recommended, as it is usually unnecessary and can cause poor performance. In many situations where calling M:System.Windows.UIElement.UpdateLayout might be appropriate, the layout system will probably already be processing updates. The layout system can process layout changes in a manner that can optimize all necessary updates as part of a package.

The layout system keeps two separate queues of invalid layouts, one for M:System.Windows.UIElement.Measure(System.Windows.Size) and one for M:System.Windows.UIElement.Arrange(System.Windows.Rect). The layout queue is sorted based upon the order of elements in the visual tree. Elements higher in the tree are at the top of the queue, in order to avoid redundant layouts caused by repeated changes in parents. Duplicate entries are automatically removed from the queue, and elements are automatically removed from the queue if they are already valid.

When updating layout, the M:System.Windows.UIElement.Measure(System.Windows.Size) queue is emptied first, followed by the M:System.Windows.UIElement.Arrange(System.Windows.Rect) queue. An element in the M:System.Windows.UIElement.Arrange(System.Windows.Rect) queue will never be arranged if there is an element in the M:System.Windows.UIElement.Measure(System.Windows.Size) queue.

.NET Framework
3.0 이후 사용 가능
Silverlight
2.0 이후 사용 가능
Windows Phone Silverlight
7.0 이후 사용 가능
맨 위로 이동
표시: