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

Mouse events doesn't fire

1 Answer 53 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Roberto Vercellone
Top achievements
Rank 1
Roberto Vercellone asked on 07 Sep 2010, 09:46 AM

 

 

 

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

<
Grid>

 

 

 

 

<Grid.RowDefinitions>

 

 

 

 

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

 

 

 

 

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

 

 

 

 

</Grid.RowDefinitions>

 

 

 

 

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

 

 

 

 

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

 

 

 

 

</Grid>

Any suggestion ?
Thanks

 

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 10 Sep 2010, 09:41 AM
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.

Greetings,
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
Tags
HTMLPlaceHolder
Asked by
Roberto Vercellone
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or