From feea7d4040f180321fe3328ddc1dc0951e9ac39d Mon Sep 17 00:00:00 2001 From: marco-calautti Date: Sun, 13 May 2018 15:15:57 +0200 Subject: [PATCH] Fixed Keyboard not showing second time. --- WPFTabTip/TabTipAutomation.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/WPFTabTip/TabTipAutomation.cs b/WPFTabTip/TabTipAutomation.cs index 857212a..86e2400 100644 --- a/WPFTabTip/TabTipAutomation.cs +++ b/WPFTabTip/TabTipAutomation.cs @@ -105,6 +105,16 @@ public static void BindTo() where T : UIElement }), handledEventsToo: true); + EventManager.RegisterClassHandler( + classType: typeof(T), + routedEvent: UIElement.PreviewMouseDownEvent, + handler: new RoutedEventHandler((s, e) => + { + if (((UIElement)s).IsFocused) + FocusSubject.OnNext(new Tuple((UIElement)s, true)); + }), + handledEventsToo: true); + EventManager.RegisterClassHandler( classType: typeof(T), routedEvent: UIElement.GotFocusEvent,