Represents the task pane that is associated with the current window in Microsoft 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.
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.