WPF behaviour to check/uncheck a checkbox in a list item
问题 I have an application with several item controls (treeviews and others) which contain an item template with a checkbox inside. This checkbox checked state is bound to an IsChecked property of the item view model. This works correctly when clicking on the checkbox, but it's impossible to check/uncheck them with the keyboard (I believe this is due to the fact that the checkbox itself never gets the focus). I like the solution proposed by DLeh in here: https://stackoverflow.com/a/24327765/352826