Reputation: 7165
I've tried -this- but it seems not work in WPF,
and saw -here- it says it'll be complicated.
So how to detect the current focused textbox in C# WPF?
Upvotes: 0
Views: 1558
Reputation: 4213
There seem to be a few ways of doing this, depending on what it is exactly that you are wanting.
UIElement elementWithFocus = Keyboard.FocusedElement as UIElement;
Upvotes: 2