# Ribbon.ContextualTabGroups Property

> Gets a collection of all contextual tab groups of this ribbon. The collection can be used to add or remove items and to set item properties. The property value is an object of the type Windows.Forms.Ribbon.ContextualTabGroupCollection

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.Windows.Forms.Ribbon`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Windows.Forms.Ribbon > Ribbon.ContextualTabGroups Property
- **428 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbon/contextualtabgroups-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbon/contextualtabgroups-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbon/contextualtabgroups-property/llms-full.txt

---

### Description

Gets a collection of all contextual tab groups of this ribbon. The collection can be used to add or remove items and to set item properties. The property value is an object of the type [Windows.Forms.Ribbon.ContextualTabGroupCollection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/contextualtabgroupcollection/llms-full.txt)

### Syntax

```csharp
public ContextualTabGroupCollection ContextualTabGroups { get; }
```

```vbnet
Public ReadOnly Property ContextualTabGroups As ContextualTabGroupCollection
```

### Examples

The following example iterates through the contextual tab groups collection and processes each contextual tab group.

```csharp
foreach (TXTextControl.Windows.Forms.Ribbon.ContextualTabGroup contextualTabGroup in ribbon.ContextualTabGroups)
{
    contextualTabGroup.Name = "CustomerName";
}
```

```vbnet
For Each contextualTabGroup As TXTextControl.Windows.Forms.Ribbon.ContextualTabGroup In ribbon.ContextualTabGroups
    contextualTabGroup.Name = "CustomerName"
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [Ribbon Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbon/constructor/llms-full.txt)
- **Next:** [Ribbon.DisplayColors Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbon/displaycolors-property/llms-full.txt)
