小编Nac*_*984的帖子

Using OnKeyDown and OnPreviewKeyDown in a Canvas

I have a DragCanvas class that inherits from Canvas and that implements functionality in order to grab, drag and resize elements. The DragCanvas class is very similar to the one provided by Josh Smith in the following article: http://www.codeproject.com/Articles/15354/Dragging-Elements-in-a-Canvas

I'd like to be able to capture keyboard events as well in order to delete elements and duplicate them. I have overriden the OnKeydown and OnPreviewKeyDown methods and placed breakpoints in there, but they are never hitting. I'm quite inexperienced in …

wpf canvas onkeydown

1
推荐指数
1
解决办法
3827
查看次数

标签 统计

canvas ×1

onkeydown ×1

wpf ×1