Assembly: PresentationCore (in presentationcore.dll)
'Declaration Public Function AddOwner ( _ ownerType As Type _ ) As RoutedEvent 'Usage Dim instance As RoutedEvent Dim ownerType As Type Dim returnValue As RoutedEvent returnValue = instance.AddOwner(ownerType)
The type of the class where the routed event is added.
Return ValueThe identifier field for the event. This return value should be used to set a public static read-only field that will store the identifier for the representation of the routed event on the owning class. This field must be accessible because it will be required to attach any instance handlers for the event when using the AddHandler utility method.
The following example adds the current class as another owner of an event defined in a different class. Here, AnotherEditContainer is the current class, and the EditStateChangedEvent RoutedEvent field is defined as a member of that class. The MyEditContainer class originally defined the event, registering it with the identically named EditStateChangedEvent identifier.