Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable tab stop on a stackpanel

I have a stackpanel that keeps getting focus when I tab around in the application.

Using snoop I can see that the stackpanel has a ContentControl which has a ContentPresenter. It is the ContentControl that gets the focus. How can I disable this? And why is this default behavior?

like image 611
Michael Avatar asked Jun 06 '12 21:06

Michael


1 Answers

This is not the default behavior, if it has been overwritten by some resource then you can reset it with

KeyboardNavigation.IsTabStop="False"

Or alternatively...

FocusManager.IsFocusScope="False"
like image 149
jimmyjambles Avatar answered Sep 29 '22 20:09

jimmyjambles