ComponentFactory.Krypton.Toolkit.ViewManager.GotFocus C# (CSharp) Method

GotFocus() public method

Perform got focus handling.
public GotFocus ( ) : void
return void
        public virtual void GotFocus()
        {
            // Tell current view of source event
            if (ActiveView != null)
                ActiveView.GotFocus(_control);
            else if (_root != null)
                _root.GotFocus(_control);
        }

Usage Example

        /// <summary>
        /// Raises the GotFocus event.
        /// </summary>
        /// <param name="e">An EventArgs that contains the event data.</param>
        protected override void OnGotFocus(EventArgs e)
        {
            // Cannot process a message for a disposed control
            if (!IsDisposed)
            {
                // Do we have a manager for processing source messages?
                ViewManager?.GotFocus();
            }

            // Let base class fire standard event
            base.OnGotFocus(e);
        }