Hi,
What event is called when I press the Delete key on my keyboard on one of the items in the tree? I need to know because I need to make sure that the item is not only removed from the visual tree, but also from my Database where that item is. What event is called when I press the delete key?
Is there anything that can help me create shortcuts for Adding an Item to the tree for example? I tried making my own shortcuts by exposing the keyDown event in the TreeListView, but the event is only hit when I double click an item in the tree and start typing.
this is what I tried to do:
What event is called when I press the Delete key on my keyboard on one of the items in the tree? I need to know because I need to make sure that the item is not only removed from the visual tree, but also from my Database where that item is. What event is called when I press the delete key?
Is there anything that can help me create shortcuts for Adding an Item to the tree for example? I tried making my own shortcuts by exposing the keyDown event in the TreeListView, but the event is only hit when I double click an item in the tree and start typing.
this is what I tried to do:
private void TreeListView_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Delete)
menuWithButtons_DeleteTaskClick(null, null); // another method is called, in which i delete the item from the DB
}
I couldn't make it work so that a person can select an item, press 'a' key, and have another item added to the tree. Is there a way to do that?
I hope there is a way because I also want to make copy and paste work, and it's not just going to be a copy and paste of the text on the tree item, but of the whole item that is stored in my DB and associated with that title in the tree.
Thanks!
Olga