Right mouse button support
Last post 05-14-2008 11:27 AM by jpsscott. 4 replies.
Sort Posts:
05-07-2008 2:52 PM
Right mouse button support

Hi all,

 I know this will probably start some big debate about what is right/wrong etc. etc.

The fact remains that it is very critical that our applications have right-mouse button support.  I realize that all platforms may not support right-mouse events but every windows application in use in the last 10 - 15 years has supported right-click.  We have implemented right-click in our web apps as well and have gotten great feedback from it.

 As an application designer I am well aware that not everyone knows about right-click, however most do, and most use it to save time while using an application.  (When I select an item at the bottom, why do I have to go all the way up to the toolbar to invoke it?).  Almost all power users use some from of right-click to "discover" the features in the application.

I think the biggest thing about right-click that threw me off with Silverlight was the Textbox.  I literally thought my right mouse button was broken when I was in a Silverlight text box and couldn't copy something out of it (I know I can use Ctrl+C but do all users?).  This, combined with the fact that Silverlight seems to be the only place in Microsoft technology on a Windows system that right-clicking in a textbox doesn't do anything.  This really breaks the user experience in my opinion.

Please, please, please implement right-click.

I have found a workaround using "isWindowless" and using a javascript right-click.  I can't seem to get it working yet but I'll keep at it.  Worst still is "isWindowless" is supposed to decrease my Silverlight performance which is exactly why I went to Silverlight in the first place.

I would also be open to UI suggestions on how I can replace right-click with a similar functionality that is not right-click.

Thanks,

James

jpsscott

Joined on 03-10-2008
Posts 33
05-09-2008 2:33 AM
Re: Right mouse button support

Unfortunately this feature is unlikely to be included in Silverlight 2... But it's something that we're considering to add in the next version. I can't assure you that now...

By the way, you may want to use Ctrl + mouse left button as a workaround. Many Mac programs use this way to display a Context Menu. In the MouseLeftButtonDown event, check the Keyboard.Modifiers:

if (Keyboard.Modifiers == ModifierKeys.Control)

{

//Display Context Menu.

}

shanaolanxing - Please mark the posts as answers if they help and unmark if they don't.

Yi-Lun Luo - MSFT

Joined on 10-29-2007
Posts 1,084
05-13-2008 11:26 AM
Re: Right mouse button support

Hi,

 Thanks for the response.  I definitely have some comments/questions:

1)  You are asking me to use a Ctrl + Click to get a context menu when this is a Mac thing.  We do have some Mac users but we're mostly Windows so that doesn't help them at all.  Is this some new direction Microsoft is taking to get rid of context menus?  I can't see it.  I love my right mouse button!  It saves me time using all kinds of applications.

2)  This really is such an obvious omission from a developer's perspective that I cannot believe you are doing SL 2.0 without it.  I seen comments back in the 1.0 beta days from people asking you for this.  It's really unfortunate that you are not listening to us here.

3)  If it takes extra time to get a Silverlight release out with proper mouse support than so be it.  I'll bet most people are willing to wait.

Can someone please tell me what the performance implications truly are for windowless or not?  I have to make a decision as to whether we can use Silverlight or not for our products going forward and if we are going to be impacted by going windowless just so I can get right-mouse button support I want to know now.  Again, I see lots of spots where people talk of windowless as a huge performance penalty.  Can comeone please explain why, and if its possible to structure a program to not incur that penalty?

Thanks,

James

jpsscott

Joined on 03-10-2008
Posts 33
05-13-2008 10:56 PM
Marked as Answer
Re: Re: Right mouse button support

Well, if you're targeting Windows only, please consider WPF. WPF has much more features than Silverlight, including mouse right button support. You use Silverlight when you need cross platform support, or when installing full .NET 3.0/3.5 on every machine is not an option (.NET 3.0 is pre-installed on Vista, but requires separate installing on XP, .NET 3.5 is not pre-installed on any machine). XBAP is the WPF version of web application platform which runs inside the browser. For .NET 3.0, XBAP only supports IE, but for .NET 3.5, it also supports Firefox. WPF's performance is also better than Silverlight in most cases as long as your graphic card supports hardware accelarating.

For the performance issues with windowless, it only happens when you set both windowless to true and background to transparent. If your plug-in's background is not transparent, you won't encounter any performance issues. Also, Silverlight plug-in on Mac always runs in the windowless mode. So the key point is: Don't set the plug-in's background to transparent unless you have to. Set background of a Grid/Canvas/etc to transparent has no performance issues.

shanaolanxing - Please mark the posts as answers if they help and unmark if they don't.

Yi-Lun Luo - MSFT

Joined on 10-29-2007
Posts 1,084
05-14-2008 11:27 AM
Re: Re: Right mouse button support

Hi, 

Thanks for the response.  I'm not targeting Windows only, and one of the appealing things about Silverlight is its lightweight .NET framework that can easily be installed in the browser.

I also found a property for the object tag of Silverlight called EnableFramerateCounter and set it to true.  This has allowed me to at least get a hint into any performance-related problems and so far I haven't seen any big ones.

Since I am not using a transparent background I think I'm OK here.

Here's hoping that some important rich application support gets included in future releases.

Thanks,

James

jpsscott

Joined on 03-10-2008
Posts 33