Detach Method
Collapse the table of content
Expand the table of content

IExtension(Of T).Detach Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Enables an object to find out when it is no longer aggregated. Called when an extension is removed from the IExtensibleObject(Of T).Extensions property.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

'Declaration
Sub Detach ( _
	owner As T _
)

Parameters

owner
Type: T
The extensible object that aggregates this extension.

Use the Detach method to find out when the extension has been removed. An extension can use this to unhook events on the extensible object. An extension can also throw System.InvalidOperationException from this method to indicate that, after it has been added, the extension cannot be removed.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft