RadHtmlPlaceHolder leaves the HTML painted in the screen after the parent window is closed

2 posts, 0 answers
  1. Nithya
    Nithya avatar
    5 posts
    Member since:
    Jul 2012

    Posted 01 Mar 2013 Link to this post


    I have a RadHtmlPlaceHolder that displays the HTML source content within a Silverlight ChildWindow. The 'windowless' and 'RespectSilverlightLayoutMeasure' properties are set to true.

    There is couple of radio buttons in the childwindow to flip between the silverlight and HTML view. If the silverlight view is ON when the childwindow is closed, everything works fine. However, if the HTML View(RadHtmlPlaceHolder View) is ON, the childwindow closes without any problem but leaves the HTML painted in the screen/browser. The browser must be refreshed or closed to remove the Html view.

    Is there any property that could be used to close the view seamlessly?

    Xaml used:

    <telerik:RadBusyIndicator x:Name="BusySpinner" Background="Transparent"  BusyContent="" Style="{StaticResource RadBusyIndicatorStyleYellow}" >
            <StackPanel x:Name="HostRoot" >
                <StackPanel x:Name="xamlUtilitiesPanel" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0, 0, 10, 0" >
                    <RadioButton x:Name="xamlRadioBtnSilverlightView" Content="Silverlight View" GroupName="View" Margin="0, 0, 10, 0" IsChecked="True" Checked="OnSilverlightViewChecked" ></RadioButton>
                    <RadioButton x:Name="xamlRadioBtnMVCView" Content="MVC View" GroupName="View" Margin="0, 0, 10, 0" Checked="OnMVCViewChecked" Visibility="{Binding Path=HasMVCView, Converter={StaticResource VisibilityConverter}}"></RadioButton>
                <StackPanel x:Name="xamlSilverlightViewHolder">

                <StackPanel x:Name="xamlMVCViewHolder" Visibility="Collapsed" >
                    <telerik:RadHtmlPlaceholder x:Name="xamlHtmlPlaceHldr" Width="1024" Height="768"
                                        Margin="10" HtmlSource="{Binding Path=MVCViewResultHTML}" 
                                        KeepContentInMemory="True" RespectSilverlightLayoutMeasure="True"/>

    Please let me know if you want any more details.
  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1237 posts

    Posted 06 Mar 2013 Link to this post

    Hello Nithya,

    In your scenario it will be best if you use the RadWindow control in combination with the RadHtmlPlaceholder. Note that the RadWindow is designed to be used in combination with the RadHtmlPlaceholder. For more information you can refer to this article. For your convenience I prepared a solution implementing the described (in the article) approach. Please take a look at it and let me know if you need further instructions.

    All the best,
    Pavel R. Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top