# Selection.Italic Property

> Gets or sets the italic attribute of the selected text.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > Selection.Italic Property
- **573 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/selection/italic-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/selection/italic-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/selection/italic-property/llms-full.txt

---

### Description

Gets or sets the italic attribute of the selected text.

### Syntax

```csharp
public bool Italic { get; set; }
```

```vbnet
Public Property Italic As Boolean
```

### Examples

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

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

selection.Italic = true;
if (selection.Italic)
{
    Console.WriteLine("Selection: Italic is enabled.");
}
```

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

selection.Italic = True
If selection.Italic Then
    Console.WriteLine("Selection: Italic is enabled.")
End If
```

### Limitations

Runtime only.

### Remarks

The property's default value is false.

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

---

## Nearby

- **Previous:** [Selection.IsCommonValueSelected Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/selection/iscommonvalueselected-method/llms-full.txt)
- **Next:** [Selection.Length Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/selection/length-property/llms-full.txt)
