Share via


ISPWManagedToolAddin.OnToolBeforeUnload Method

Called when the user has closed the workspace or the window containing the tool.

Namespace:  Microsoft.Office.SharePointWorkspace.AddIn
Assembly:  Microsoft.Office.SharePointWorkspace.AddIn.Interface (in Microsoft.Office.SharePointWorkspace.AddIn.Interface.dll)

Syntax

'Declaration
Sub OnToolBeforeUnload
'Usage
Dim instance As ISPWManagedToolAddin

instance.OnToolBeforeUnload()
void OnToolBeforeUnload()

Remarks

This method allows you to clean up before the tool is unloaded. At a minimum, you should call Dispose() on the object or objects that implement ISPWManagedToolAddin and ISPWManagedToolAddinUI.

When the user closes a workspace currently displaying an add-in tool or closes a window containing the tool, the following methods are called in order:

  1. OnHide()

  2. OnToolDeactivate()

  3. OnToolBeforeUnload()

There is no mechanism to block the tool from being unloaded. You can only dispose of any structures.

See Also

Reference

ISPWManagedToolAddin Interface

ISPWManagedToolAddin Members

Microsoft.Office.SharePointWorkspace.AddIn Namespace