3
Answers

wpf issue on contextmenu

Kaushik Bhatt

Kaushik Bhatt

3y
505
1

I am using MVVM pattern in WPF. I want to call one event on right click of context menu but It is not triggered as my context menu inside 

Datatemplate Itemcontrol within Gridview. please see below my code.I want to trigger on textblock right click below DeleteCommand from viewmodel.

 

   <ContextMenu>
                                                                            <MenuItem Header="Delete" Command="{Binding DeleteCommand }" />
                                                                     
                                                                        </ContextMenu>

 

Answers (3)