FrameworkElement.OnInitialized Method

Raises the Initialized event. This method is invoked whenever IsInitialized is set to true internally.

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

protected virtual void OnInitialized(
	EventArgs e
)

Parameters

e
Type: System.EventArgs

The RoutedEventArgs that contains the event data.

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.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft