FrameworkElement.ParentLayoutInvalidated(UIElement) FrameworkElement.ParentLayoutInvalidated(UIElement) FrameworkElement.ParentLayoutInvalidated(UIElement) FrameworkElement.ParentLayoutInvalidated(UIElement) Method

定義

FrameworkElement 的特定子類別中支援累加配置實作。Supports incremental layout implementations in specialized subclasses of FrameworkElement. ParentLayoutInvalidated(UIElement) 會在子項目使得屬性失效時叫用,該屬性在中繼資料內已標記,會在配置期間影響父代的測量或排列傳遞。ParentLayoutInvalidated(UIElement) is invoked when a child element has invalidated a property that is marked in metadata as affecting the parent's measure or arrange passes during layout.

protected public:
 virtual void ParentLayoutInvalidated(System::Windows::UIElement ^ child);
protected internal virtual void ParentLayoutInvalidated (System.Windows.UIElement child);
abstract member ParentLayoutInvalidated : System.Windows.UIElement -> unit
override this.ParentLayoutInvalidated : System.Windows.UIElement -> unit
Protected Friend Overridable Sub ParentLayoutInvalidated (child As UIElement)

參數

child
UIElement UIElement UIElement UIElement

報告變更的子項目。The child element reporting the change.

備註

如果這個項目有子項目某些屬性已失效,及屬性已標記為AffectsParentMeasureAffectsParentArrange屬性中繼資料,在註冊期間,這個方法會叫用。If this element has a child element on which some property was invalidated and the property was marked as AffectsParentMeasure or AffectsParentArrange in property metadata during registration, this method is invoked. 方法引動過程會告知哪個特定子項目必須重新測量,如果這個項目支援部分的版面配置的 (累加) 更新的父項目。The method invocation notifies the parent element which particular child element must be re-measured if this element supports partial (incremental) update of layout.

根據預設,FrameworkElement不支援累加配置,然後在FrameworkElement類別此方法有沒有預設的實作。By default, FrameworkElement does not support incremental layout, and in the FrameworkElement class this method has no default implementation. 覆寫此方法時,可能需要的案例並不常見,因為它需要您修改預設的版面配置系統行為。The scenario where overriding this method would be necessary is not common, because it requires you to modify the default layout system behavior.

範例實作的狀況可能是類別是否有可能的子項目,明顯比 WPF 架構層級配置系統更嚴格的型別限制。An example implementation scenario might be if a class had type limitations for possible child elements that are significantly more restrictive than the WPF framework-level layout system. 由於這些自訂項目,屬性變更可能會刻意延後當您實作一些自訂的版面配置行為。Because of the nature of these custom elements, property changes could be deliberately deferred when you implement some custom layout behavior. 比方說,量值/排列方法覆寫,嘗試最佳化的子項目會呈現階段,可能會延後,特定類型的變更通常會導致另一個版面配置階段。For instance, measure/arrange method overrides, which try to optimize the child element render pass, could be deferred for certain types of changes that would ordinarily result in another layout pass.

適用於