can any one explain me about adding items to contextmenu for a xamdatagrid dynamically . i am using MVVM pattern .. I need to add items based on some roles dynamically ..its like attaching behaviors based on roles. Please can you provide a sample for the same .
Note : I went through different posts related to context menu in mvvm but not really much solved my purpose.
i have tryed another approach and its wokring for me .thanks
Hello cravika,
You can provide steps that was ran.
Sorry, I have tryed this but its not working . Can you please check from your end once
In the ClickCommand contains the class member for ItemClickedEventArgs. Using the example provided in the Execute method you can get the menu item using "this._itemClickedEventArgs.Item".
HI
Example looks really goood ..but the only doubt i have is in the execute method how can we know which menuitem is clicked