Mouse events doesn't fire

2 posts, 0 answers
  1. Roberto Vercellone
    Roberto Vercellone avatar
    1 posts
    Member since:
    May 2010

    Posted 07 Sep 2010 Link to this post




    I use RadHtmlPlaceholder as follow but MouseEnter and MouseLeave events doesn't fire.
    (Windowless parameter is set to true).











    <RowDefinition Height="30"></RowDefinition>





    <RowDefinition Height="*"></RowDefinition>










    <sdk:Label x:Name="ttt" Content="eeeeeeeeeeeeeeeeeeeeeeee" Grid.Row="0" />





    <telerik:RadHtmlPlaceholder Grid.Row="1" Height="Auto" HorizontalAlignment="Left" SourceUrl=" Name="RadHtmlPlaceholder1" VerticalAlignment="Top" Width="Auto" />






    Any suggestion ?


  2. Kiril Stanoev
    Kiril Stanoev avatar
    1512 posts

    Posted 10 Sep 2010 Link to this post

    Hi Roberto,

    In its core RadHtmlPlaceholder is an IFrame element that is dynamically placed on top of the Silverlight plugin. That is why any Silverlight event will not fire while the mouse is over the RadHtmlPlaceholder. One possible solution I can offer is to take a look at the JavaScript-Managed Code bridge. What I have in mind is to try and add mouse enter and mouse leave events to RadHtmlPlaceholder in JavaScript. When the JavaScript mouse enter and mouse leave get called, they should invoke the c# methods for mouse enter and mouse leave. More information on the bridge you can find in the articles bellow:

    Walkthrough: Calling Managed Code from JavaScript

    Walkthrough: Calling JavaScript from Managed Code

    Calling Javascript functions from RadHtmlPlaceholder

    Another possible partial solution is Silverlight only. Try wrapping the HtmlPlaceholder in 2 Borders - one for MouseEnter and one for MouseLeave. I've attached a sample project demonstrating this solution. Have a look at it and let me know how it goes.

    Kiril Stanoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top