Element. On Initialized(EventArgs) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
This particular On* method is not a class handler hook. Nor does it exactly follow the established common language runtime (CLR) On* method convention that the matching event could be suppressed by overriding this method and not calling the base implementation.
Note that the IsInitialized property is read-only, so you cannot set IsInitialized to force initialization behavior. Setting the initialization state is intended to be done only by the Windows Presentation Foundation (WPF) framework.
Notes to Inheritors
The default implementation of this virtual method raises the event as described above. Overrides should call the base implementation to preserve this behavior. If you fail to call the base implementation, not only will you not raise the Initialized event as is generally expected of a FrameworkElement derived class, but you will also suppress two important style and theme style initialization operations that are implemented by this base implementation.