FrameworkContentElement.OnInitialized(EventArgs) 方法

定義

引發 Initialized 事件。Raises the Initialized event. 每當 IsInitialized 設定為 true 時會叫用此方法。This method is invoked whenever IsInitialized is set to true.

protected:
 virtual void OnInitialized(EventArgs ^ e);
protected virtual void OnInitialized (EventArgs e);
abstract member OnInitialized : EventArgs -> unit
override this.OnInitialized : EventArgs -> unit
Protected Overridable Sub OnInitialized (e As EventArgs)

參數

e
EventArgs

事件的事件資料。Event data for the event.

備註

此虛擬方法的預設執行會引發事件,如本主題稍早所述。The default implementation of this virtual method raises the event as described earlier in this topic. 覆寫應該呼叫 base ()以保留此行為。Overrides should call base() to preserve this behavior.

請注意,IsInitialized 屬性是唯讀的。Note that the IsInitialized property is read-only. 因此,您無法將其設定為強制執行這種方式的初始化行為。Therefore, you cannot set it to force initialization behavior that way. 初始化設定只能由 Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 架構來完成。Initialization setting is intended to be done only by the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) framework.

適用於