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

how to auto size the components to fit the window

1 Answer 88 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 24 Feb 2012, 01:42 PM

i have it inside in a grid but i cannot dock it to center

i want the document to resize with window size and take all the available width and height

can someone provide a sample?

thanks
Alex

p.s. (see the image for better understanding of the problem)

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 29 Feb 2012, 12:23 PM
Hello Alex,

 You should make a grid with the following row definitions:

<Grid.RowDefinitions>
           <RowDefinition Height="Auto"/>
           <RowDefinition Height="*"/>
           <RowDefinition Height="Auto"/>
       </Grid.RowDefinitions>

Place the ribbonUI at Grid.Row="0", the RadRichTextBox at Grid.Row="1" and the status bar at Grid.Row="2". This should make the positioning correct.  
You can also check the code of the click-once demo here. Navigate to RichTextBox -> Telerik Editor and click the Code button in the top right corner. Then, you can check the main XAML and code-behind files needed for the creation of the sample project.

All the best,
Martin
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
RichTextBox
Asked by
Alex
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or