These are chat archives for AvaloniaUI/Avalonia

21st
Mar 2018
Steven Kirk
@grokys
Mar 21 2018 00:01
oh, that's buggy tooling. you might need to close and re-open VS
William Humphreys
@WHumphreys
Mar 21 2018 00:08
No its really not having it. Tried emptying the obj folders restoring blah. Im wondering if the update that I installed this morning for VS may have broke it a bit.
William Humphreys
@WHumphreys
Mar 21 2018 00:18
Ill look in the morning its bedtime for me :-)
The RawKeyboardActions.Deactivate flag is what causes the keyboard focus to be set to null.
Have you tried listening on the LostKeyboardFocus event instead of the LostFocus event?
The LostKeyboardFocus event fires when clicking out of a window.
Steven Kirk
@grokys
Mar 21 2018 00:33
oh interesting, so there are two lost focus events?
i never even realized that
UWP doesn't seem to have LostKeyboardFocus though, i wonder how it's done there?
it seems confusing to have two; i think i'd rather follow UWP in only having the one

i don't have time to check now but the UWP docs say

A control can lose focus when another control gets focus, the application view changes, the user switches applications, or interacts with the system such that the application is no longer in the foreground.

which suggests it raises LostFocus when the window is deactivated