System.Windows.Interop.ActiveXHost.OnLostFocus C# (CSharp) Méthode

OnLostFocus() private static méthode

private static OnLostFocus ( object sender, KeyboardFocusChangedEventArgs e ) : void
sender object
e KeyboardFocusChangedEventArgs
Résultat void
        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);
                }
            }
        }