Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Silverlight 4 ContextMenu to DataGrid row using XAML?

Silverlight 4 has a new ContextMenu control in the latest toolkit.

I can't find any examples anywhere on how to reliably use this ContextMenu on a DataGrid row. Theres a tonne of context menus out there but I want to use the new version from the toolkit.

I'd like to be able to set context menus for rows as well as cells.

The only way I've found is to manually create the menu on right click and show it, but I'd like to do it in XAML.

Note: You need to currently use this workaround to avoid binding problems when using ContextMenu in XAML for a datagrid cell.

like image 544
Simon_Weaver Avatar asked May 06 '10 05:05

Simon_Weaver


1 Answers

The developer of the Toolkit's ContextMenu wrote this article, specifically talking about using it with a DataGrid Delay's Blog

like image 151
Jim McCurdy Avatar answered Oct 19 '22 01:10

Jim McCurdy