I have a DataGrid that is bound to a the Values in a ObservableDictionary
(my own class) instead of the traditional ObservableCollection
. Because of this, I cannot use the build in delete mechanism of the GridView. I therefore need to implement my own custom delete behavior on the current selected row when the Delete button is pressed.
My problem is that I cannot get an event when the delete button is pressed. Neither the Deleted, Deleting or KeyDown events for the DataGrid is firing. The CanUserDeleteRows property is set to true.
How can I get an event to fire when the Delete key is pressed?