Caret stops blinking in WPF TextBox
I am looking for an event that will fire when the caret TextBox
stops blinking. Let's say I have:
<TextBox LostFocus="txtBox_LostFocus" />
In order for the event txtBox_LostFocus
to fire, the other control must receive focus, while the control has focus. If I click on the text box, | starts flashing. When I leave the text box, | stops blinking and the LostFocus event is not triggered why? The LostFocus event only fires if I click on another custom control. How can I know when | stops flashing?
Note. I call | the cursor may have a different name.
AND
I used Keyboard.ClearFocus();
when the user presses ENTER on the textbox to stop Caret flickering. This also triggers an event LostKeyboardFocus
!
source to share
I can't test it just this second, but looking at the available events for the class TextBox
on MSDN there is an event LostKeyboardFocus
similar to what you can after that.
LostKeyboardFocus - Raised when the keyboard no longer focuses on this element. (Inherited from UIElement.)
source to share