Reputation: 12216
I'm surprised to notice that my right click code no longer works in-browser for Silverlight 3. I think the problem could be that in SL2 I was using the asp Silverlight control and setting the property Windowless=true. That control was removed in SL3 and now I'm using an object tag to display Silverlight content. How can I get this to work again? Code is:
ctor()
{
HtmlPage.Document.AttachEvent("oncontextmenu", OnContextMenu);
}
public void OnContextMenu(object sender, HtmlEventArgs e)
{
MessageBox.Show("Right click.");
e.PreventDefault();
}
Upvotes: 2
Views: 777
Reputation: 189457
Include in your object tags param list the following param:-
<param name="windowless" value="True" />
I'm surprised to here that the asp:silverlight control is gone? Are you sure?
Upvotes: 2