Kaushik Bhatt

Kaushik Bhatt

  • NA
  • 48
  • 2.6k

wpf issue on contextmenu

Sep 17 2021 7:25 AM

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)