ComponentFactory.Krypton.Navigator.VisualPopupPage.GetControlWithFocus C# (CSharp) Méthode

GetControlWithFocus() private méthode

private GetControlWithFocus ( Control control ) : Control
control System.Windows.Forms.Control
Résultat System.Windows.Forms.Control
        private Control GetControlWithFocus(Control control)
        {
            // Does the provided control have the focus?
            if (control.Focused)
                return control;
            else
            {
                // Check each child hierarchy in turn
                foreach (Control child in control.Controls)
                    if (child.ContainsFocus)
                        return GetControlWithFocus(child);

                return null;
            }
        }