Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Prevent keyboard shortcuts in TreeView

$
0
0

Hi,

I have noticed that when I press the numpad minus (-) the TreeView will collapse the current tree branch. I want to disable this temporarily sometimes as it steals focus from the TreeViewItem that was selected before the minus was pressed. But I don't want to prevent the KeyUp event from reaching down to my controls inside the TreeViewItems, because I need that minus (and any other keys pressed) to reach the KeyUp event in those controls.

So is there a way to temporarily tell the TreeView to ignore all key events but still let them propagate to all its children controls? By "ignore" I mean "don't steal my focus!"

Thanks!


Stoffi Music Player
A simple approach to music
www.stoffiplayer.com - blog.stoffiplayer.com - dev.stoffiplayer.com

A free and open music application developed in C# using Windows Presentation Foundation.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>