FrameworkElement.IsInitialized FrameworkElement.IsInitialized FrameworkElement.IsInitialized FrameworkElement.IsInitialized Property

定義

取得值,指出在由 XAMLXAML 處理器處理期間,或是明確地呼叫 EndInit() 方法時,是否已初始化這個項目。Gets a value that indicates whether this element has been initialized, either during processing by a XAMLXAML processor, or by explicitly having its EndInit() method called.

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

屬性值

如果對於每個先前提及的 XAMLXAML 處理或方法呼叫將項目初始化,則為 true;否則為 falsetrue if the element is initialized per the aforementioned XAMLXAML processing or method calls; otherwise, false.

備註

這個屬性也可能true如果此項目具有移動邏輯樹狀結構內,使它有新的父項目,並且因此變成一次重新載入。This property may also be true if this element has been moved within the logical tree such that it has a new parent element, and therefore becomes reloaded again.

此屬性相當實用,如果您也使用BeginInitEndInitThis property is useful if you also are using BeginInit and EndInit. 載入邏輯樹狀結構中的項目XAMLXAML處理器可確保系統能夠進行初始化。Elements in the logical tree that is loaded by a XAMLXAML processor are assured to be initialized. 不在邏輯樹狀結構中的項目都初始化時EndInit呼叫。Elements not in the logical tree are initialized when EndInit is called. 任何特定處理缺少BeginInitEndInit,會發生這只要建構函式會傳回初始化的結果。In absence of any specific handling of BeginInit and EndInit, this will happen as soon as the constructor returns the initialized result.

適用於