Hello,
I have a Canvas and in it a Border. Now I want to give focus to this Border. Can somebody please tell me how do do this? Seems like it's not that easy ): Thanks for any hint!
Hello,
I have a Canvas and in it a Border. Now I want to give focus to this Border. Can somebody please tell me how do do this? Seems like it's not that easy ): Thanks for any hint!
Border inherits from UIElement (via System.Windows.FrameworkElement and System.Windows.Controls.Decorator) so you can call the Focus method from the C# (or VB, C++, F#) code.
I haven't tried it for Borders, but with a WPF ContentControl, I think I had to set IsTabStop and IsEnabled to true to get it to be able to accept focus.