Focus on the border on canvas

I have a canvas and the Border in it. Now I want to focus on this border.
Can someone please tell me how to do this?

+7
wpf border canvas focus
source share
2 answers

First make sure you have Border.Focusable = True. After that, just call Border.Focus () and you will be well off.

+3
source share

I have not tried it for Border s, but with WPF ContentControl , I think I had to set IsTabStop and IsEnabled to true so that it could take focus.

-2
source share

All Articles