Share via


ConsoleVisibilityContainer Class

Container that governs whether contained controls are displayed, based on user preference and page state.

Inheritance Hierarchy

System.Object
  System.Web.UI.Control
    System.Web.UI.WebControls.WebControl
      Microsoft.SharePoint.Publishing.WebControls.ConsoleVisibilityContainer

Namespace:  Microsoft.SharePoint.Publishing.WebControls
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public NotInheritable Class ConsoleVisibilityContainer _
    Inherits WebControl
'Usage
Dim instance As ConsoleVisibilityContainer
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public sealed class ConsoleVisibilityContainer : WebControl

Remarks

Some controls are more appropriate to show to the user based on when the page is in specific states. This container determines visibility of a control based on three scenarios:

  • Whether an error has just occurred.

  • Whether the user has chosen to view the Page Editing toolbar.

  • Whether the page is published.

When this control is placed on the page, the page designer can decide in which of these scenarios to show the controls within the container. Contained controls are always displayed if any one of the selected scenarios occurs.

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

ConsoleVisibilityContainer Members

Microsoft.SharePoint.Publishing.WebControls Namespace