# ContextualTabGroupCollection Class

> The ContextualTabGroupCollection class represents all groups of ribbon tabs which are only shown in a certain context. Each ContextualTabGroup object contained in the collection represents one group of tabs. A Ribbon control manages a collection of contextual tab groups, which is available through the ContextualTabGroups property.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **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
- **Inherits:** `System.Collections.Generic.List<TXTextControl.Windows.Forms.Ribbon.ContextualTabGroup>`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Windows.Forms.Ribbon > ContextualTabGroupCollection Class
- **501 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/contextualtabgroupcollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/contextualtabgroupcollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/contextualtabgroupcollection/llms-full.txt

---

### Description

The ContextualTabGroupCollection class represents all groups of ribbon tabs which are only shown in a certain context. Each [ContextualTabGroup](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/contextualtabgroup/llms-full.txt) object contained in the collection represents one group of tabs. A [Ribbon](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbon/llms-full.txt) control manages a collection of contextual tab groups, which is available through the [ContextualTabGroups](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbon/contextualtabgroups-property/llms-full.txt) property.

### Syntax

```csharp
public class ContextualTabGroupCollection : List<ContextualTabGroup>
```

```vbnet
Public Class ContextualTabGroupCollection
    Inherits List(Of ContextualTabGroup)
```

### Examples

The following example includes the capacity value from a Contextual Tab Group Collection object in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Capacity: {contextualTabGroupCollection.Capacity}");
Console.WriteLine("Contextual Tab Group Collection is ready for use.");
```

```vbnet
Console.WriteLine($"Capacity: {contextualTabGroupCollection.Capacity}")
Console.WriteLine("Contextual Tab Group Collection is ready for use.")
```

---

## Nearby

- **Previous:** [ContextualTabGroup.Visible Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/contextualtabgroup/visible-property/llms-full.txt)
- **Next:** [DialogBoxLauncher Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/dialogboxlauncher/llms-full.txt)
