Share via


ISPWManagedToolAddin.OnToolStart Method

Called the first time the user navigates to the tool after opening the workspace or when the user opens the tool in its own window.

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

Syntax

'Declaration
Sub OnToolStart ( _
    i_SPWTool As ISPWTool, _
    i_SPWToolUI As ISPWToolUI _
)
'Usage
Dim instance As ISPWManagedToolAddin
Dim i_SPWTool As ISPWTool
Dim i_SPWToolUI As ISPWToolUI

instance.OnToolStart(i_SPWTool, i_SPWToolUI)
void OnToolStart(
    ISPWTool i_SPWTool,
    ISPWToolUI i_SPWToolUI
)

Parameters

Remarks

When the user opens a workspace and navigates to a tool or opens a window with the tool, the following methods are called in order:

  1. OnToolStart(ISPWTool, ISPWToolUI)

  2. OnToolActivate()

  3. OnShow()

The following is the method as generated by the add-in project template:

public void OnToolStart(ISPWTool i_SPWTool, ISPWToolUI i_SPWToolUI)
{
   this.spwTool = i_SPWTool;
   this.spwToolUI = i_SPWToolUI;
   this.dataConnector = (SPWDataConnector)this.spwTool.DataConnector;
   this.InitializeDataView();
   this.spwToolUI.Show(this);
}

See Also

Reference

ISPWManagedToolAddin Interface

ISPWManagedToolAddin Members

Microsoft.Office.SharePointWorkspace.AddIn Namespace