The border is intentionally displayed only when navigating the keyboard (Tab key). The MSDN page on this topic contains additional information:
Focused visual styles only work when a keyboard focus has been triggered. Any mouse action or changing the focus of a program disables the mode for visual focus styles.
If you want to show a border, you can use the Trigger on the IsFocused-Property to make some visual changes (although you cannot set a border with this), or if you really want a border, you will have to create your own control pattern.
There is also a thread here on SO , on some related topic, which suggests simulating a keystroke, but I would suggest not using this solution for your problem.
source share