How to stretch the content in HtmlPlaceHolder to whole page

4 posts, 0 answers
  1. Zhiyong
    Zhiyong avatar
    15 posts
    Member since:
    Jul 2010

    Posted 03 Sep 2010 Link to this post

    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
  2. Travis
    Travis avatar
    223 posts
    Member since:
    Jan 2003

    Posted 07 Sep 2010 Link to this post

    I have the same problem.  Is this not possible?  I can survive without width being able to stretch, but not height.
  3. DevCraft banner
  4. Travis
    Travis avatar
    223 posts
    Member since:
    Jan 2003

    Posted 07 Sep 2010 Link to this post

     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.
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 08 Sep 2010 Link to this post

    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
Back to Top