Reporting Content Height

8 posts, 1 answers
  1. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 11 Aug 2009 Link to this post

    I know that another thread indicated that this was not a support property of the HTMLPlaceHolder, but I think that to be useful it need to report the actual height taken (and auto-expand as needed) based on the width it consumes or is provided. So, I would like to second that this is requested functionality; otherwise, this control provides no value since I cannot determine how to size the height without knowing the content height.
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 11 Aug 2009 Link to this post

    Hi Dennis,

    Just to clarify - are you talking about the case when an external url is loaded inside the RadHtmlPlaceholder?

    Best wishes,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 11 Aug 2009 Link to this post

    No, I have a HTML string stored that I just want rendered. So, I am simply assigning the string to the HtmlSource property of the control. Doing it this way, is there a way to autosize the height?
  5. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 12 Aug 2009 Link to this post

    Hi Dennis,

    It is should be working by default this way. Can you send as a sample code where it behaves differently.

    Here is our test code:
    XAML:
    <StackPanel> 
                <Rectangle Fill="Yellow" Width="100" Height="100"></Rectangle> 
                <telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder1"/>  
                <Rectangle Fill="Red" Width="100" Height="100"></Rectangle> 
                </StackPanel> 

    C#:
    public MainPage()  
            {  
                InitializeComponent();  
                RadHtmlPlaceholder1.HtmlSource = String.Format(@"<div style=""width:50px;height:50px;background-color:white;"">test</div>");  
            } 


    Best wishes,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 12 Aug 2009 Link to this post

    This seems to work in all but 1 case. If the source content is an empty string, it does not collapse the Placeholder, it keeps it expanded at about 300 pixels. So, RadHtmlPlaceholder1.HtmlSource = String.Format (String.Empty); does not return what I would expect.

    I am still having some other height issues, but I think they may be on my side. So, I will go with this for now and see what happens. Thanks.
  7. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 12 Aug 2009 Link to this post

    The problem that I am experiencing is when the RadHtmlPlaceholder is placed into a Docking Pane. It does not size its height correctly. I am going to open a ticket with a test project for you. Thanks.
  8. Alexander Kotchkin
    Alexander Kotchkin avatar
    23 posts
    Member since:
    Sep 2009

    Posted 27 Feb 2011 Link to this post

    I am having the same issue.

    Thanks,

    Jesus
  9. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 02 Mar 2011 Link to this post

    Hi Jesus Janne,

    Can you please elaborate on your scenario and the issue you experience with the RadHtmlPlaceHolder? If you can share a sample code snippet illustrating your case, we will be able to investigate it and provide you with a suited solution.

    Thank you in advance.

    Kind regards,
    Tina Stancheva
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
DevCraft banner