# Changing Text Alignment

## Content



The C1FilePicker control typically displays the current file selected in the text area of the control. This text is aligned to the left by default, but you can change the text alignment if you choose. Text alignment can be set using the [TextAlignment](/componentone/api/wpf/online-input-net/dotnet-api/C1.WPF.Input/C1.WPF.Input.C1FilePicker.TextAlignment.html) property, and options include Left (default), Center, or Right text alignment. For more information, see the steps below.

### In XAML

To set the **TextAlignment** property to Right add **TextAlignment="Right"** to the **<c1:C1FilePicker>** tag so that it appears similar to the following:

```xml
<c1:C1FilePicker Name="C1FilePicker1" TextAlignment="Right" HorizontalAlignment="Left" Margin="112,36,0,0" VerticalAlignment="Top" Width="161" />
```

### In Code

To set the TextAlignment property to Right, add the following code to your project:

```vbnet
Me.C1FilePicker1.TextAlignment = TextAlignment.Right
```

```csharp
this.c1FilePicker1.TextAlignment = TextAlignment.Right;
```

### At Design Time

To set the **TextAlignment** property to **Right** at design time, complete the following steps:

1.  Click the **C1FilePicker** control once to select it.
2.  Navigate to the **Properties** window and locate the **TextAlignment** item.
3.  Click the drop-down arrow next to the **TextAlignment** item and select **Right**.

The text is now aligned to the right. Run the application and select a file. Notice that the name of the file is now aligned to the right in the C1FilePicker control:

![](https://cdn.mescius.io/document-site-files/images/47c7dd3c-b586-44f5-903c-f615f88e343f/images/filepicker/changetextalign.png)