Recommended

  • Silverlight 4 Podcast Pack with Tim Heuer
  • Building Modular Silverlight Applications
  • Prism -  10 Things to Know
  • Securing Silverlight Application and WCF Service using ASP.Net Authentication Techniques
  • Model– View – ViewModel in Silverlight

More from Silverlight Show

Skip Navigation LinksHome / News / View News

Right-clicking in Silverlight 4 to Create a Context Menu

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Dec 16, 2009
(0 votes)
Tags: UI Elements , Menus , Silverlight 4
In this post Gill Cleeren demonstrates one new feature added in Silverlight 4 - the ability to react to right-clicks in a Silverlight application.

Because Silverlight now supports right-clicking, we can create a context menu that appears on the right-click event. We can code this context menu as we want. Right-clicking is supported on any UIElement: on the UIElement class, there are two new events added, namely the MouseRightButtonDown and the MouseRightButtonUp. Both of these new events use MouseButtonEventArgs as their event arguments, which are also used for the normal left click events.

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 6 and 6 and type the answer here: