Back to Devexpress

RibbonTab.Visible Property

aspnet-devexpress-dot-web-dot-ribbontab-fa7c9f0a.md

latest3.1 KB
Original Source

RibbonTab.Visible Property

Gets or sets a value specifying the visibility of the current tab.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(true)]
public bool Visible { get; set; }
vb
<DefaultValue(True)>
Public Property Visible As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true, to show the tab; otherwise, false.

|

Remarks

Use the Visible property to dynamically change the ribbon tab visibility. This property enables you to hide and display specific tabs when certain conditions are met.

To get a tab visibility on the client side, use the ASPxClientRibbonTab.GetVisible method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Visible property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

asp-net-web-forms-spreadsheet-download-file-on-custom-ribbon-item-click/CS/ASPxSpreadsheetBinding/Default.aspx.cs#L44

csharp
Spreadsheet.CreateDefaultRibbonTabs(true);
Spreadsheet.RibbonTabs.Find(p => p.Text == "File").Visible = false;
RibbonButtonItem item = new RibbonButtonItem("Download", "Download");

asp-net-web-forms-spreadsheet-download-file-on-custom-ribbon-item-click/VB/ASPxSpreadsheetBinding/Default.aspx.vb#L55

vb
Spreadsheet.CreateDefaultRibbonTabs(True)
Spreadsheet.RibbonTabs.Find(CType(Function(p) Equals(p.Text, "File"), Predicate(Of RibbonTab))).Visible = False
Dim item As RibbonButtonItem = New RibbonButtonItem("Download", "Download")

See Also

GetVisible

Ribbon

RibbonTab Class

RibbonTab Members

DevExpress.Web Namespace