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 ( # A1 以保留此行为。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.

适用于