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
<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
5 Answers, 1 is accepted
0
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.
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.
0
Adam
Top achievements
Rank 1
answered on 17 Aug 2009, 07:27 PM
Thanks, how would I accomplish this using the HtmlSource binding as I am?
0
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.
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.
0
steve
Top achievements
Rank 1
answered on 01 Oct 2009, 03:34 PM
Sorry for being dense but if i past the code snippit into my silverlight c# code behind
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
(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
0
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.
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.