Back to Devexpress

RibbonPageGroupCollection.GetGroupByText(String) Method

windowsforms-devexpress-dot-xtrabars-dot-ribbon-dot-ribbonpagegroupcollection-dot-getgroupbytext-x28-system-dot-string-x29.md

latest3.6 KB
Original Source

RibbonPageGroupCollection.GetGroupByText(String) Method

Retrieves a group by its caption.

Namespace : DevExpress.XtraBars.Ribbon

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public RibbonPageGroup GetGroupByText(
    string text
)
vb
Public Function GetGroupByText(
    text As String
) As RibbonPageGroup

Parameters

NameTypeDescription
textString

A string that represents the caption of the group to be located. A group’s caption is specified by the RibbonPageGroup.Text property.

|

Returns

TypeDescription
RibbonPageGroup

A RibbonPageGroup object with the specified caption.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetGroupByText(String) method.

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.

winforms-dashboard-custom-properties/CS/WinForms-Dashboard-Custom-Properties/Modules/DashboardDescriptionModule.cs#L25

csharp
RibbonPage page = ribbon.GetDashboardRibbonPage(DashboardBarItemCategory.None, DashboardRibbonPage.Home);
RibbonPageGroup group = page.Groups.GetGroupByText(DashboardWinLocalizer.GetString(DashboardWinStringId.RibbonPageDashboardCaption));
BarButtonItem barItem = CreateBarItem("Dashboard Description", barImage);

winforms-dashboard-custom-properties/VB/WinForms-Dashboard-Custom-Properties/Modules/DashboardDescriptionModule.vb#L25

vb
Dim page As RibbonPage = ribbon.GetDashboardRibbonPage(DashboardBarItemCategory.None, DashboardRibbonPage.Home)
Dim group As RibbonPageGroup = page.Groups.GetGroupByText(DashboardWinLocalizer.GetString(DashboardWinStringId.RibbonPageDashboardCaption))
Dim barItem As BarButtonItem = CreateBarItem("Dashboard Description", barImage)

See Also

Text

RibbonPageGroupCollection Class

RibbonPageGroupCollection Members

DevExpress.XtraBars.Ribbon Namespace