Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 554
Aaron Fischer Avatar asked Nov 20 '08 00:11

Aaron Fischer


People also ask

How do I display the context menu?

Pressing Shift-F10 will bring up the context menu for any selected item.

How do I change right click menu to right?

Type regedit and press Enter. You should see a value named MenuDropAlignment in the right pane (If it doesn't exist, create a new string value named MenuDropAlignment). Double-click on it to modify. In order to make context menu open to the right side, type 0 in the Value data field and click OK.


2 Answers

Right-click context menu is now part of the Silverlight Control Toolkit.

What it can and can't do: http://blogs.msdn.com/delay/archive/2010/04/15/alive-and-kickin-new-silverlight-4-toolkit-released-with-today-s-silverlight-4-rtw.aspx

like image 145
foson Avatar answered Oct 12 '22 12:10

foson


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!

like image 31
Bryant Avatar answered Oct 12 '22 10:10

Bryant