Home > WPF > ListView with Dynamic ContextMenu

ListView with Dynamic ContextMenu

When we want to display a ContextMenu based on the ListViewItem(Row) that was clicked, we have to handle ContextMenuOpening event and add our menuitems in that event. Attached sample shows how to do this.(change .doc to .zip)

Categories: WPF Tags: , ,
  1. Petr Snobelt
    August 19, 2008 at 12:57 pm | #1

    Hi, this help me a lot,
    but it throws exception which can be overcame by using

    <!–

    –>

    Thanks a lot
    Petr

  2. Jason
    October 27, 2009 at 8:10 pm | #2

    I can’t open the word document explaining how to do this.

  3. lee
    October 27, 2009 at 8:33 pm | #3

    Hi,
    Save it as a zip file and you can find the sample

  1. No trackbacks yet.