Scroller Bar position

2 posts, 0 answers
  1. Dave
    Dave avatar
    32 posts
    Member since:
    Feb 2008

    Posted 19 Jan 2012 Link to this post

    I have seen an example of getting and setting the position of the ScrollViewer control.  How do we Get and Set the position of each ScrollViewer bar within the RadHtmlPlaceHolder?  Any guidance is appreciated.
  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 23 Jan 2012 Link to this post

    Hello Dave,

    The RadHtmlPlaceholder places its content in a div (if the RadHtmlPlaceholder.HtmlSource is set) or in an IFrame (if the RadHtmlPlaceholder.SourceUrl is set) on the html/aspx page hosting the Silverlight plug-in. This is why you can control the scroll bars in the RadHtmlPlaceholder either by setting the overflow properties applied to the html/aspx page elements or by controlling the IFrame scrolling attribute.

    Basically when you display an external page in the RadHtmlPlaceholder, you can access the content of the IFrame object like so:
    HtmlElement iframe = (HtmlElement)myHtmlPlaceHolder.HtmlPresenter.Children[0];
    HtmlWindow contentWindow = iframe.GetProperty("contentWindow") as HtmlWindow;
    HtmlDocument document = contentWindow.GetProperty("document") as HtmlDocument;

    I hope this information will help you.

    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top