TaskPane.Visible property

Gets or sets a value indicating that the task pane represented by the TaskPaneObject object is visible in the Microsoft InfoPath user interface.

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

Syntax

'Declaration
Property Visible As Boolean
    Get
    Set
'Usage
Dim instance As TaskPane
Dim value As Boolean

value = instance.Visible

instance.Visible = value
bool Visible { get; set; }

Property value

Type: System.Boolean

Remarks

Setting the Visible property to True causes the task pane to appear in the user interface, and setting it to False causes it to be removed from the user interface.

Important

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Examples

In the following example, the TaskPanes collection is used to set a reference to the HTMLTaskPane object that represents the custom task pane. Then the Visible property of the HTMLTaskPane object is used to make the custom task pane appear in the InfoPath user interface

TaskPane objTaskPane = thisXDocument.View.Window.TaskPanes[0];
objTaskPane.Visible = true;

See also

Reference

TaskPane interface

TaskPane members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace