CustomTaskPaneCollection.Add Method (UserControl, String, Object)
Assembly: Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)
- Type: System.Windows.Forms.UserControl
A UserControl that provides the user interface for the new custom task pane.
- Type: System.String
The text that appears in the title bar of the new custom task pane.
- Type: System.Object
An object that represents the application window to associate the new custom task pane with.
Use this method to create a new CustomTaskPane that is associated with a specific application window. This method is useful if you want to create custom task panes that are visible with multiple Inspectors or Explorers in Outlook, or with multiple documents in Word or InfoPath.
The type of the window parameter depends on the application. The following table lists the valid types of the window parameter.
Although a CustomTaskPaneCollection is a collection of CustomTaskPane objects, the Add method accepts UserControl objects instead of CustomTaskPane objects. For more information, see Custom Task Panes.
- 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.