RadHtmlPlaceHolder persisting between views

4 posts, 0 answers
  1. Jerry
    Jerry avatar
    70 posts
    Member since:
    Jan 2011

    Posted 30 Apr 2013 Link to this post

    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 
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 02 May 2013 Link to this post

    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.

  3. DevCraft banner
  4. Jerry
    Jerry avatar
    70 posts
    Member since:
    Jan 2011

    Posted 16 May 2013 Link to this post

    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 
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 18 May 2013 Link to this post

    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.

Back to Top