I'm using a windows forms ListView in a C# application and I capture the KeyDown event on it to allow deleting a row using the Delete key. The TreeView class has the TreeNode.IsEditing property if I ever needed it but I couldn't find one in the ListView class. If the user is editing the label of a ListViewItem, I want the Delete key to do the default behavior instead of deleting the item. Is there any built in property I can use? Or do I need to trap both the Before and AfterLabelEdit events?
Edit: Sorry, I had a context menu set with the keyboard shortcut set to the Delete key. This is the event getting called and not the KeyDown event.