FrameworkContentElement.EndInit 方法


在初始化項目之後立即呼叫。Called immediately after an element is initialized.

 virtual void EndInit();
public virtual void EndInit ();
abstract member EndInit : unit -> unit
override this.EndInit : unit -> unit
Public Overridable Sub EndInit ()



執行這個方法,以提供在專案載入程式期間初始化專案時應該發生的特殊處理。Implement this method to provide special handling that should occur when your element is initialized during the element loading process.

您的執行應該會呼叫基底實作為,因為基底(預設值)會設定一些內部旗標來追蹤初始化。Your implementation should call the base implementation, because the base (default) implementation sets some internal flags to keep track of initialization.

如果先前已呼叫 BeginInit,基底實作為會引發 Initialized 事件。If BeginInit was previously called, the base implementation will raise the Initialized event. 否則,如果未呼叫 BeginInit 或無法判斷是否已呼叫 BeginInit,就不會引發事件。Otherwise, if BeginInit was not called or it could not be determined whether BeginInit was called, the event is not raised.