編輯

共用方式為


View.Visible Property

Definition

Gets or sets a value that indicates whether the View control is visible.

public:
 virtual property bool Visible { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(false)]
public override bool Visible { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.Visible : bool with get, set
Public Overrides Property Visible As Boolean

Property Value

true if the View control is visible; otherwise, false. The default value is false.

Attributes

Exceptions

An attempt was made to set this property at run time.

Remarks

Use the Visible property to determine whether the current View control is visible and rendered to the client. For a View control to be visible on the rendered page, it must be the active view in its containing MultiView control, and the containing MultiView control must be visible. If the containing MultiView control is not visible on the page, or if the View control is not the active view, then the View control and its child controls are not rendered.

Note

The Visible property is set internally based on the visibility and active view for the containing parent control. If you set this property at run time, an InvalidOperationException exception is thrown. If you set the Visible property at design time, any changes to the property are ignored.

Applies to

See also