# Selection.Culture Property

> Gets or sets the culture of the selected text.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 20.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.Culture Property
- **641 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/culture-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/culture-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/culture-property/llms-full.txt

---

### Description

Gets or sets the culture of the selected text.

### Syntax

```csharp
public CultureInfo Culture { get; set; }
```

```vbnet
Public Property Culture As CultureInfo
```

### Examples

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

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

selection.Culture = System.Globalization.CultureInfo.GetCultureInfo("en-US");
if (selection.Culture != null)
{
    Console.WriteLine("Selection: Culture is available.");
}
```

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

selection.Culture = System.Globalization.CultureInfo.GetCultureInfo("en-US")
If selection.Culture IsNot Nothing Then
    Console.WriteLine("Selection: Culture is available.")
End If
```

### Limitations

Runtime only.

### Remarks

The property's default value is null, which means a neutral culture.

The property returns its default value when the text selection contains multiple characters with mixed culture 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 Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/constructor/llms-full.txt)
- **Next:** [Selection.DecreaseIndent Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/decreaseindent-method/llms-full.txt)
