TaskPane Class

Represents the task pane that is associated with the current window in Microsoft Office InfoPath 2007.

Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)

The TaskPane class provides properties for working with the InfoPath built-in task panes. The HtmlTaskPane class inherits these properties for working with a custom task pane.

The properties available for an InfoPath task pane are determined by the type of task pane that you are working with. If the TaskPaneType property returns TaskPaneType.Html, the task pane is a custom task pane and the properties and methods available are provided by the HtmlTaskPane class. If the TaskPaneType property returns any other value, the task pane is a built-in task pane and the properties are provided by the TaskPane object.


TaskPaneType property returns values defined by the TaskPaneType enumeration. These enumerated values are also used as arguments to the Item(TaskPaneType) property of the TaskPaneCollection class for returning a reference to a specified type of task pane.

The following example sets a reference to the TaskPane object in the TaskPaneCollection with the index value of 3, displays its TaskPaneType value (ClipArt), and then displays the Clip Art task pane.

TaskPane myTaskPane = this.TaskPanes[3];
myTaskPane.Visible = true;

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions