private void OnKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Delete) { OutlinerItemModel sObjModel = outlinerTreeView.SelectedItem as OutlinerItemModel; mainWindow.RemovePropertiesPanel(); IGCore.DeleteSceneObject(sObjModel.Name); Refresh(); } }