I've created a Silverlight application with a RadHtmlPlaceHolder and a button which toggles the visibility of the RadHtmlPlaceHolder. When the RadHtmlPlaceHolder is visible, the whole html page seems to increase its height and a vertical scroll bar appears on the browser window, even though all the html content (and silverlight content) fits within the browser window. When the RadHtmlPlaceHolder is invisible, the scroll bar goes away. This issue occurs with IE7 but doesn't occur with Firefox 3.
The code I used is shown below. I've also attached a screenshot of the issue.
Any help would be appreciated.
The code I used is shown below. I've also attached a screenshot of the issue.
<UserControl x:Class="SilverlightApplication1.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" <Grid x:Name="LayoutRoot"> <Grid.RowDefinitions> <RowDefinition Height="2*" /> <RowDefinition Height="8*"/> </Grid.RowDefinitions> <Button Grid.Row="0" Content="Show / Hide" Click="Button_Click" /> <telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder1" Grid.Row="1" Visibility="Collapsed" /> </Grid> </UserControl>; |
using System; using System.Windows; using System.Windows.Controls; namespace SilverlightApplication1 { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); RadHtmlPlaceholder1.SourceUrl = new Uri("http://www.google.com"); } private void Button_Click(object sender, RoutedEventArgs e) { if (RadHtmlPlaceholder1.Visibility == Visibility.Collapsed) { RadHtmlPlaceholder1.Visibility = Visibility.Visible; } else { RadHtmlPlaceholder1.Visibility = Visibility.Collapsed; } } } } |
Any help would be appreciated.