Show() public method

Show the popup using the provided rectangle as the screen rect.
public Show ( Rectangle screenRect ) : void
screenRect System.Drawing.Rectangle Screen rectangle for showing the popup.
return void
Ejemplo n.º 1
0
        /// <summary>
        /// Show the popup using the provided rectangle as the screen rect.
        /// </summary>
        /// <param name="screenRect">Screen rectangle for showing the popup.</param>
        public virtual void Show(Rectangle screenRect)
        {
            // Update the screen position
            SetBounds(screenRect.X, screenRect.Y,
                      screenRect.Width, screenRect.Height);

            // If we have a shadow then update it now
            _shadow?.Show(screenRect);

            // Show the window without activating it (i.e. do not take focus)
            PI.ShowWindow(Handle, PI.ShowWindowCommands.SW_SHOWNOACTIVATE);

            // Use manager to track mouse/keyboard input and to dismiss the window
            VisualPopupManager.Singleton.StartTracking(this);
        }