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 property, and options include Left (default), Center, or Right text alignment. For more information, see the steps below.
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.
In XAML
For example, to set the TextAlignment property to Right add TextAlignment="Right" to the <c1:C1FilePicker> tag so that it appears similar to the following:
<c1:C1FilePicker HorizontalAlignment="Left" Margin="112,36,0,0" Name="C1FilePicker1" VerticalAlignment="Top" Width="161" TextAlignment="Right" />
In Code
For example, to set the TextAlignment property to Right, add the following code to your project:
Me.C1FilePicker1.TextAlignment = TextAlignment.Right
•C#
this.c1FilePicker1.TextAlignment = TextAlignment.Right;
What You've Accomplished
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: