FrameworkContentElement.BeginInit 方法

定義

已在初始化項目之前呼叫。Called before an element is initialized.

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

實作

給繼承者的注意事項

覆寫這個方法,以提供在專案載入程式期間初始化專案之前,應該發生的特殊處理。Override this method to provide special handling that should occur before 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.

如果在到達 EndInit()之前,在相同專案上呼叫 BeginInit() 一次以上,基底執行將會擲回例外狀況。The base implementation will throw an exception if BeginInit() is called more than one time on the same element prior to reaching EndInit().

適用於