Share via


IExtension<T>.Detach Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
Sub Detach ( _
    owner As T _
)
void Detach(
    T owner
)

Parameters

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

Remarks

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.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.