Aaron Fischer
Aaron Fischer

Reputation: 21211

How can I setup a Right Click context menu in Silverlight?

I want to create a right click context menu for my textboxes to provide the typical copy/paste functionality. Any ideas on how to go about this?

Upvotes: 14

Views: 22466

Answers (4)

Ziad
Ziad

Reputation: 1036

The demo in this open source project does just that while supporting nested menus:

http://sl4popupmenu.codeplex.com/

Upvotes: 0

Tjipke
Tjipke

Reputation: 408

Just for completeness. The above links are for version 1.1 (before beta of 2). The latest version for silverlight 2 is at http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2008/05/28/how-to-handle-rightclick-mouse-event-in-silverlight-take-2.aspx

Upvotes: 4

Bryant
Bryant

Reputation: 8670

Looks like this is a way to do this here, another example here, and the most recent one here. Using these methods you should be able to show your own context menu. Once you have that you'll need access to the clipboard and there is an example of this here.

Good luck!

Upvotes: 7

Related Questions