Browse Source

Moved the setting of FocusedElement

This allows the LostFocus event to check the newly focused element
pull/1427/head
sdoroff 9 years ago
parent
commit
28c78d3fc9
  1. 2
      src/Avalonia.Input/KeyboardDevice.cs

2
src/Avalonia.Input/KeyboardDevice.cs

@ -46,13 +46,13 @@ namespace Avalonia.Input
if (element != FocusedElement)
{
var interactive = FocusedElement as IInteractive;
FocusedElement = element;
interactive?.RaiseEvent(new RoutedEventArgs
{
RoutedEvent = InputElement.LostFocusEvent,
});
FocusedElement = element;
interactive = element as IInteractive;
interactive?.RaiseEvent(new GotFocusEventArgs

Loading…
Cancel
Save