AdornerProvider.Deactivate Method
Called when an adorner provider is about to be discarded by the designer.
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
The Deactivate method is called before the adorners are removed from the designer user interface (UI).
Use the Deactivate method to detach event handlers which you attached earlier in the lifetime of the AdornerProvider.
An AdornerProvider instance may be activated and deactivated several times during its lifetime. Implement the Activate and Deactivate methods accordingly.
The following code example shows how to override the Deactivate method. For more information, see Walkthrough: Creating a Design-time Adorner.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.