This is a migrated thread and some comments may be shown as answers.

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

1 Answer 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nithya
Top achievements
Rank 1
Nithya asked on 01 Mar 2013, 07:33 PM
Hi-

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:

<ChildWindow>
<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>
            <StackPanel x:Name="xamlSilverlightViewHolder">

            </StackPanel>
            <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"/>
            </StackPanel>
        </StackPanel>
    </telerik:RadBusyIndicator>
</ChildWindow>

Please let me know if you want any more details.

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 06 Mar 2013, 03:41 PM
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.

Tags
General Discussions
Asked by
Nithya
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or