Focus control

alt text

in the image above, you will notice that the anchored rectangle pointing to the ComboBox is focused But the problem is that it is larger than the ComboBox text area ... how to align it with the text area WPF style ?

thanks

0


a source to share


1 answer


Without seeing your ControlTemplate, it's hard to give a better way to change it.

One slightly hacky way to do this is by setting the Focusable on the ComboBox to False and then setting the Focusable on the TextBlock (or Label) to True. This should make it so that the TextBlock gets focus whenever the ComboBox should.



My best guess, however, is that you have strange margins, the real way to fix this would be to straighten them.

+1


a source







All Articles