Partager via


TaskPane Class

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

Inheritance Hierarchy

System.Object
  Microsoft.Office.InfoPath.TaskPane
    Microsoft.Office.InfoPath.HtmlTaskPane

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustInherit Class TaskPane
'Usage
Dim instance As TaskPane
public abstract class TaskPane

Remarks

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.

Note

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.

Examples

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];
MessageBox.Show(myTaskPane.TaskPaneType.ToString());
myTaskPane.Visible = true;
Dim myTaskPane As TaskPane  = Me.TaskPanes(3)
MessageBox.Show(myTaskPane.TaskPaneType.ToString())
myTaskPane.Visible = true

Thread Safety

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

See Also

Reference

TaskPane Members

Microsoft.Office.InfoPath Namespace