Click here to Skip to main content
15,893,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working in a application with many views. I need same context menu for all grids but functionality needs to be different for each grid for menu items.(i.e, the context menu should be same but, on click functionality must be different for each grid). I don't know how to implement this in WPF.
Please suggest me some approach to implement the requirements.
Posted
Updated 28-Nov-13 22:56pm
v2

1 solution

To Accomplish your Generic context Menu Functionality:

1.Create Your own Custom context menu. http://msdn.microsoft.com/en-us/library/ms744758%28v=vs.85%29.aspx[^]


2.Apply your custom context menu for the Grid.
3.Hope you have a common associated base class for all your views.
4.If point 1 is true, then Have Virtual Click event in your base class and you can Override the same in all your subsequent derived class and have your custom logic for different views.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900