RSS
 

Silverlight 2 Enabling Right Click

08 Jun

Microsoft didn’t include the functionality to customize the Right Mouse Click in a Silverlight Application. But there is a workaround and there isn’t much coding involved.

The workaround does limit your application behaviour. In the ASPX page where you’re calling the Silverlight Application, you can put a Windowless property to true.

MSDN information: http://msdn.microsoft.com/en-us/library/system.web.ui.silverlightcontrols.silverlight.windowless(VS.95).aspx

Complex animations and high definition video content will not perform well in windowless mode. To compensate, you can adjust the frame rate for Silverlight content by using the MaxFrameRate property. However, you should also test your code with a variety of platforms and browsers when you use windowless mode.

The limitations of windowless mode are as follows:

  • Performance issues. Windowless mode is computationally expensive, especially in combination with a transparent plug-in background. For more information, see Performance Tips.
  • No support for passing mouse input to HTML content that the plug-in overlaps, even if the plug-in has a transparent background. To process mouse input through HTML, the HTML must overlap the Silverlight plug-in.
  • No mouse capture support outside the boundary of the plug-in.
  • No accessibility or IME support.
  • No support for windowless mode in full-screen mode.
  • No support for suppressing popup blockers when using hyperlink navigation to new windows. Also, note that popup blocker suppression is not supported on Safari regardless of the windowing mode.
  • Issues because of browser and platform limitations:
    • Visual tearing in animation and video playback on Windows XP, on Windows Vista with DWM disabled, and in Internet Explorer, regardless of platform.
    • Unreliable rendering when overlapping HTML content in Safari.

Focus issues in Mozilla-based browsers. When the focus moves between the plug-in and other plug-ins or HTML controls, multiple controls will sometimes appear to have focus.

To implement the Custom Right Mouse Click on Silverlight 2 Application: http://silverlight.net/blogs/msnow/archive/2008/07/01/tip-of-the-day-14-how-to-right-click-on-a-silverlight-application.aspx

Source Project: Custom Right Mouse Click

 
 

Leave a Reply

 

 
  1. KonstantinMiller

    July 7, 2009 at 4:01 am

    I have been looking looking around for this kind of information. Will you post some more in future? I’ll be grateful if you will.

     
  2. admin

    July 13, 2009 at 2:07 pm

    Hello KonstantinMiller,
    I post all the things I come across on my Silverlight adventure :)