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

RadHtmlPlaceHolder persisting between views

3 Answers 58 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 30 Apr 2013, 11:11 PM
Hi, 

Im getting a problem where the RadHtmlPlaceHolder shows up across different views (when it shouldnt).

I've seen someone else mention they have a similar problem and to fix it, they had to integrate the RadHtmlPlaceHolder inside a RadWindow.

I have tried that but still have my html persisting between views.

I have also tried using the Unloaded control but this does not get triggered either, as this control is in a separate XAP file.

Is there any way to stop this from happening?

I have attached screenshots showing the initial view (where the HTML element is inside the RadWindow) and another view (where the HTML element just shows on the middle of the screen, when it should not show at all).


Thanks 

3 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 02 May 2013, 04:05 PM
Hi Jerry,
The RadHtmlPlaceHolder is in an IFrame (when in windowless mode) that is above the Silverlight plug-in and that's why it is sometimes visible when it should not be. My advice is to try to manually hide and show it by changing its visibility with something like this:
private void Button_Click(object sender, RoutedEventArgs e)
{
    this.htmlPlaceholder.Visibility = System.Windows.Visibility.Collapsed;
}
 
private void Button_Click_1(object sender, RoutedEventArgs e)
{
    this.htmlPlaceholder.Visibility = System.Windows.Visibility.Visible;
}
I hope I was able to help you and if you need further assistance please feel free to ask.

Regards,
Zarko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jerry
Top achievements
Rank 1
answered on 16 May 2013, 05:01 AM
Hi Zarko,


Thanks for your reply, its given me a good idea, however i have another slight problem which prevents me from utilising the method youve suggested.

I've tried to use an unloaded event on the XAML for when i navigate away from the page, but unfortunately, it doesnt seem to reach the unloaded event.

Is there any reason why the unloaded event may not be triggered when moving away from the page?

Or anything else that mimics an event when i move away from a page?


Thanks again.


Regards 

Jerry 
0
Pavel R. Pavlov
Telerik team
answered on 18 May 2013, 11:27 AM
Hi Jerry,

As we are not sure how you load/unload your views we suggest you to subscribe to the Unloaded event of some controls that are hosted along with the RadHtmlPlaceHolder control.

On the other hand you can try to change the Visibility of the RadHtmlPlaceHolder whenever you switch your views.

If any of these approaches are inconvenient, we will need more information about your scenario in order to make other suggestions. We need to know how you load/unload your views. It will be best if you send us a sample project illustrating your approach.

Regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
HTMLPlaceHolder
Asked by
Jerry
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Jerry
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or