Robert
Robert

Reputation: 6226

Checkbox Nested In TreeView

I have a treeview that has a checkbox nested in for each item. I want to be able to use the up and down arrows on my keyboard to traverse the tree, but the checkbox adds another step because it gets highlighted first and then the move occurs. Basically I have to use the up/down arrows twice to move up or down the tree. Is there a way to make the checkbox never get focus?

Upvotes: 0

Views: 1026

Answers (1)

Wonko the Sane
Wonko the Sane

Reputation: 10813

Set the Focusable property of the CheckBox to false.

Here is a nice example by WPF guru Josh Smith that does exactly what it sounds like you want.

Upvotes: 3

Related Questions