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

How to stretch the content in HtmlPlaceHolder to whole page

3 Answers 92 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Zhiyong
Top achievements
Rank 1
Zhiyong asked on 03 Sep 2010, 08:22 AM
I put it under the scrollview in this way

 

 

 

<Grid x:Name="LayoutRoot">

 

 

 

 

<ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >

 

 

 

 

<telerik:RadHtmlPlaceholder Name="radHtmlPlaceholder_About" Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

 

 

 

 

</ScrollViewer>

 

 

 

 

</Grid>

 


and then bind the radHtmlPlaceholder_About to one htm page. The content can be displayed, but only occupies small portion of the whole screen, could I make it strecth to whole screen. I did not found the Vertical/HorzontalContentAlignment property in RadHtmlPlaceHolder control

3 Answers, 1 is accepted

Sort by
0
Travis
Top achievements
Rank 1
answered on 07 Sep 2010, 06:38 PM
I have the same problem.  Is this not possible?  I can survive without width being able to stretch, but not height.
0
Travis
Top achievements
Rank 1
answered on 07 Sep 2010, 07:10 PM
 Zhiyong, you might try playing around with the RespectSilverlightLayoutMeasure property, setting it to True.  This seemed to fix a few things for me.  Part of my problem though is that my RadHtmlPlaceholder is in an ItemsControl, i.e. the HtmlSource is bound to data and there seems to be a default minimum height set.
0
Tina Stancheva
Telerik team
answered on 08 Sep 2010, 03:47 PM
Hello Travis and Zhiyong,

You are right about the ScrollViewer - an element with no explicitly set size would not stretch within a ScrollViewer since it provides infinitely large space to its children. however, if you need the HtmlPlaceholder to be stretched you can set the HorizontalScrollBarVisibility and VerticalScrollBarVisibility properties to False, which will stretch horizontally and vertically accordingly the content of the ScrollViewer.

Also, you can either set explicit size to the HtmlPlaceholder when used in a ScrollViewer, or not place it in a ScrollViewer, since if there is not enough available space for rendering its content, the HtmlPlaceholder will automatically show its built-in ScrollViewer.

All the best,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
HTMLPlaceHolder
Asked by
Zhiyong
Top achievements
Rank 1
Answers by
Travis
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or