// Token: 0x0600619A RID: 24986 RVA: 0x001B5E8C File Offset: 0x001B408C private static void OnLostFocus(object sender, KeyboardFocusChangedEventArgs e) { ActiveXHost activeXHost = sender as ActiveXHost; if (activeXHost != null) { Invariant.Assert(activeXHost.ActiveXState >= ActiveXHelper.ActiveXState.UIActive, "Should at least be UIActive when losing focus"); bool flag = !activeXHost.IsKeyboardFocusWithin; if (flag) { activeXHost.TransitionDownTo(ActiveXHelper.ActiveXState.InPlaceActive); } } }
/// This event handler forwards focus events to the hosted WF controls private static void OnLostFocus(object sender, KeyboardFocusChangedEventArgs e) { ActiveXHost axhost = sender as ActiveXHost; if (axhost != null) { // If the focus goes from our control window to one of the child windows, // we should not deactivate. // Invariant.Assert(axhost.ActiveXState >= ActiveXHelper.ActiveXState.UIActive, "Should at least be UIActive when losing focus"); bool uiDeactivate = !axhost.IsKeyboardFocusWithin; if (uiDeactivate) { axhost.TransitionDownTo(ActiveXHelper.ActiveXState.InPlaceActive); } } }