vertical scrollbar not showing

6 posts, 0 answers
  1. Adam
    Adam  avatar
    30 posts
    Member since:
    Jun 2009

    Posted 16 Aug 2009 Link to this post

    What do I have to do to get the vertical scrollbar showing? My XAML looks like this:

    <UserControl x:Class="Phoenix.Modules.Common.KB.Silverlight.Views.ElementRendererView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" >
        <StackPanel x:Name="LayoutRoot" Background="White">
            <Controls:RadHtmlPlaceholder  x:Name="_RadHtmlPlaceHolder" HtmlSource="{Binding HtmlSource}"></Controls:RadHtmlPlaceholder>
        </StackPanel>
    </UserControl>


    HtmlSource is set to an html string. It displays but there is no scrollbar.

    Thanks,

    Adam


  2. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 17 Aug 2009 Link to this post

    Hello Adam ,

    To avoid your issue you should set the overflow mode to auto like this:

    (myHtmlPlaceholder.HtmlPresenter.Children[0] as HtmlElement).SetStyleAttribute("overflow", "auto");

    Let me know if this helps.

    Regards,
    Tihomir Petkov
    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. Adam
    Adam  avatar
    30 posts
    Member since:
    Jun 2009

    Posted 17 Aug 2009 Link to this post

    Thanks, how would I accomplish this using the HtmlSource binding as I am?
  5. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 18 Aug 2009 Link to this post

    Hi Adam ,

    All you have to do is use the code snippet I sent you in the code-behind of your application. You can, for example, call it when the page is loaded - just remember to substitute "myHtmlPlaceholder" with the name of your RadHtmlPlaceholder instance. You don't have to change anything else.

    Kind regards,
    Tihomir Petkov
    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. steve
    steve avatar
    23 posts
    Member since:
    Jul 2009

    Posted 01 Oct 2009 Link to this post

    Sorry for being dense but if i past the code snippit into my silverlight c# code behind

    (myRadPlaceHolder.HtmlPresenter.Children[0] as HtmlElement).SetStyleAttribute("overflow""auto"); 

    The "HtmlElement" section is not recognised. Am i missing a using statement??

    Ok I was missing a "using System.Windows.Browser;"  statement.

    But this does not fix the no scroll bar problem for radplaceholders using the htmlsource property binding to a html string
  7. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 01 Oct 2009 Link to this post

    Hello steve,

    We are not aware of such proble, Can you please try your sample when the HtmlSource is not binded, but set from the code behind. Is your content still clipped and no scrolling?

    Sincerely yours,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
DevCraft banner