UIElement.IsArrangeValid 屬性


取得值,這個值表示在此項目之配置中子項目的計算大小和位置是有效的。Gets a value indicating whether the computed size and position of child elements in this element's layout are valid.

 property bool IsArrangeValid { bool get(); };
public bool IsArrangeValid { get; }
member this.IsArrangeValid : bool
Public ReadOnly Property IsArrangeValid As Boolean


如果配置的大小和位置有效則為 true,否則為 falsetrue if the size and position of layout are valid; otherwise, false.


您可以藉由在此專案(或其父代)上呼叫 InvalidateArrange,強制讓排列失效。You can force arrangement to be invalidated by calling InvalidateArrange on this element (or its parents). 這會在配置系統決定時,將重新組合的版面配置標記為。This flags the layout for recomposition at such time as the layout system determines. 或者,您也可以立即呼叫 UpdateLayout,但只有在確定沒有任何進一步的失效(不必要的強制更新會造成效能後果)時,才應該這麼做。Alternatively, an immediate call to UpdateLayout could be made, but this should only be done if it is certain that no further invalidations are pending (a large number of unnecessarily forced updates has performance consequences).

除非 IsMeasureValid 也已 true,否則無法 true IsArrangeValid (在版面配置程式中,無法在沒有度量第一個有效的情況下有效)。IsArrangeValid cannot be true unless IsMeasureValid is also true (in the layout process, arrangement cannot be valid without measurement first being valid).