# InputFormat.LeftIndent Property

> Gets or sets the left indent, in twips, at the current input position. If text is selected, the property specifies the left indent of the whole selected text.

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

---

### Description

Gets or sets the left indent, in twips, at the current input position. If text is selected, the property specifies the left indent of the whole selected text.

### Syntax

```csharp
public int? LeftIndent { get; set; }
```

```vbnet
Public Property LeftIndent As Integer?
```

### Examples

The following XAML example binds the LeftIndent property to a text box. The value of the left indent is converted to centimeter.

```plaintext
…
xmlns:tx="clr-namespace:TXTextControl.WPF;assembly=TXTextControl.WPF"
…
<Window.Resources>
    <tx:MeasureConverter Unit="Centimeter" x:Key="twipsconv" />
</Window.Resources>
…
<TextBox 
    Height="21" 
    Name="textBoxLeftIndent" 
    Text="{Binding ElementName=textControl1,
        Path=InputFormat.LeftIndent,
        Converter={StaticResource twipsconv},
        Mode=TwoWay}"/>
```

The following example changes the formatting applied to text entered at the end of a document by using `InputFormat.LeftIndent`.

```csharp
textControl.Text = "Project summary";
textControl.InputPosition = new InputPosition(textControl.Text.Length);
InputFormat inputFormat = textControl.InputFormat;

inputFormat.LeftIndent = 720;
if (inputFormat.LeftIndent != null)
{
    Console.WriteLine("Input Format: Left Indent is available.");
}
```

```vbnet
textControl.Text = "Project summary"
textControl.InputPosition = New InputPosition(textControl.Text.Length)
Dim inputFormat As InputFormat = textControl.InputFormat

inputFormat.LeftIndent = 720
If inputFormat.LeftIndent IsNot Nothing Then
    Console.WriteLine("Input Format: Left Indent is available.")
End If
```

### Remarks

The property returns null when the text selection contains multiple paragraphs with different left indents.

The [WPF.MeasureConverter](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/measureconverter/llms-full.txt) can be used to convert the property value to another measuring unit.

---

## Nearby

- **Previous:** [InputFormat.LeftFrameLine Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputformat/leftframeline-property/llms-full.txt)
- **Next:** [InputFormat.LeftToRight Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inputformat/lefttoright-property/llms-full.txt)
