Window2.TaskPanes Property

Definition

Gets a reference to the TaskPanesCollection collection that is associated with the WindowObject object.

public:
 property Microsoft::Office::Interop::InfoPath::SemiTrust::TaskPanesCollection ^ TaskPanes { Microsoft::Office::Interop::InfoPath::SemiTrust::TaskPanesCollection ^ get(); };
public Microsoft.Office.Interop.InfoPath.SemiTrust.TaskPanesCollection TaskPanes { get; }
member this.TaskPanes : Microsoft.Office.Interop.InfoPath.SemiTrust.TaskPanesCollection
Public ReadOnly Property TaskPanes As TaskPanesCollection

Property Value

Implements

Examples

In the following example, the TaskPanes property of the WindowObject object is used to set a reference to the TaskPanesCollection collection:

TaskPanes taskPanes; 
taskPanes = thisXDocument.View.Window.<span class="label">TaskPanes</span>;

In the following example, the Item[Object] property of the TaskPanesCollection collection is used to set a reference to a specified TaskPaneObject object. Then the code uses the Visible property of the TaskPaneObject object to make the task pane visible.

TaskPane taskPane;

// Show the built-in Help task pane.      
taskPane = thisXDocument.View.Window.<span class="label">TaskPanes</span>[4];
taskPane.Visible = true;

Note: The Item[Object] property argument is the type of task pane to return, based on the TaskPaneType property of the TaskPaneObject object, not the position of the TaskPaneObject object in the TaskPanesCollection collection.

Remarks

The TaskPanesCollection collection can be used only with the editing window types; if used with a designing window type, it will return an error.

Important: This member can be accessed without restrictions.

Applies to