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
- i_SPWTool
Type: Microsoft.Office.SharePointWorkspace.AddIn.ISPWTool
The Tool object, which provides access to the tool and the tool context.
- i_SPWToolUI
Type: Microsoft.Office.SharePointWorkspace.AddIn.ISPWToolUI
The Tool User Interface object, which allows you to display the tool to the user.
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:
OnToolStart(ISPWTool, ISPWToolUI)
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);
}