Prashant Cholachagudda
Prashant Cholachagudda

Reputation: 13092

Control focus styling

alt text

in above image you would notice that, doted rectangle indicating ComboBox is focused But the problem is it exceeding the text area of ComboBox... how do I align it with text area WPF Style?

Thanks

Upvotes: 0

Views: 1445

Answers (1)

Bryan Anderson
Bryan Anderson

Reputation: 16129

Without seeing your ControlTemplate it's difficult to give the best way to change it.

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

My best guess though is that you have some weird margins going on, the real way to fix it would be to straighten those out.

Upvotes: 1

Related Questions