# Selection.Capitals Property

> Gets or sets values specifying wheather the lowercase letters of the selected text are displayed with capital letters. Lowercase letters are displayed either with capital letters of the same size or with capital letters which have a smaller size. The smaller size is either the size of the lowercase 'x' (petite caps) or the size of the lowercase 'x' + 10% (small caps).

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

---

### Description

Gets or sets values specifying wheather the lowercase letters of the selected text are displayed with capital letters. Lowercase letters are displayed either with capital letters of the same size or with capital letters which have a smaller size. The smaller size is either the size of the lowercase 'x' (petite caps) or the size of the lowercase 'x' + 10% (small caps).

### Syntax

```csharp
public Capitals Capitals { get; set; }
```

```vbnet
Public Property Capitals As Capitals
```

### Members

| Value | Description |
|---|---|
| None | There are no text effects with capital letters. |
| Capitals | All lowercase letters are displayed with capital letters. |
| PetiteCapitals | All lowercase letters are displayed with capital letters which have the size of the lowercase 'x'. |
| SmallCapitals | All lowercase letters are displayed with capital letters which have the size of the lowercase 'x' + 10%. |

### Examples

The following example formats the heading of a short document by using `Selection.Capitals`.

```csharp
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;

selection.Capitals = Capitals.Capitals;
Console.WriteLine($"Capitals used by Selection: {selection.Capitals}");
```

```vbnet
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection

selection.Capitals = Capitals.Capitals
Console.WriteLine($"Capitals used by Selection: {selection.Capitals}")
```

### Remarks

The property's default value is Capitals.None.

The property returns its default value when the text selection contains multiple characters with mixed settings. The [Selection.IsCommonValueSelected](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/iscommonvalueselected-method/llms-full.txt) method can be used to check for mixed attributes.

---

## Nearby

- **Previous:** [Selection.Bold Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/bold-property/llms-full.txt)
- **Next:** [Selection.ChangeCapitalization Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/changecapitalization-method/llms-full.txt)
