This is a migrated thread and some comments may be shown as answers.

[Solved] Vertical alignment of text inside RadRichTextBox

1 Answer 255 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexander
Top achievements
Rank 1
Alexander asked on 26 Jan 2011, 04:25 PM
Hi.
Does the RadRichTextBox support vertical text alignment?
The VerticalContentAlignment property does not affect the text position.
Thank you.

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 28 Jan 2011, 09:17 AM
Hello Alexander,

Depending on what you're trying to achieve, here's how to do it:
If you want the entire editor to be centered inside your containing control, then you can use this XAML code:

<Grid VerticalAlignment="Center">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
 
    <Border BorderBrush="Red" BorderThickness="1">
        <telerik:RadRichTextBox Name="editor" />
    </Border>
</Grid>
Please note that the border is just for demo purposes, so you can see how the control is laid out.

However, if you're trying to center the contents inside the RadRichTextBox, things are somewhat different. Currently, RadRichTextBox supports VerticalAlignment only inside TableCells. However, you can create a Table with no borders and a single cell with Center VerticalAlignment, which should behave the way you want it to.

Best wishes,
Iva
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
RichTextBox
Asked by
Alexander
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or