Version

OwnerDataInitialized Event

Fired after owner data is initialized or reinitialized.
Syntax
'Declaration
 
Public Event OwnerDataInitialized As OwnerDataInitializedEventHandler
public event OwnerDataInitializedEventHandler OwnerDataInitialized
Event Data

The event handler receives an argument of type OwnerDataInitializedEventArgs containing data related to this event. The following OwnerDataInitializedEventArgs properties provide information specific to this event.

PropertyDescription
Owner Owner being initialized or reinitialized.
Example
The following code initializes Owners by setting their Name (if it has not already been set) to the same value as the Key and also forces the Owner to be visible. This will override any settings in the underlying data.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

'If the name has not been set, set it to the same as the key
e.Owner.Visible = True
If (e.Owner.Name Is Nothing OrElse e.Owner.Name.Length = 0) Then
    e.Owner.Name = e.Owner.Key
End If
//If the name has not been set, set it to the same as the key
e.Owner.Visible = true;
if ( e.Owner.Name == null || e.Owner.Name.Length == 0 )
{
             e.Owner.Name = e.Owner.Key;
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also