System.Windows.Forms.ToolStripItem.Invalidate C# (CSharp) Method

Invalidate() public method

public Invalidate ( ) : void
return void
		public void Invalidate ()
		{
			if (parent != null)
				parent.Invalidate (this.bounds);
		}

Same methods

ToolStripItem::Invalidate ( Rectangle r ) : void

Usage Example

Example #1
0
        public void Close(ToolStripDropDownCloseReason reason)
        {
            if (!this.Visible)
            {
                return;
            }

            // Give users a chance to cancel the close
            ToolStripDropDownClosingEventArgs e = new ToolStripDropDownClosingEventArgs(reason);

            this.OnClosing(e);

            if (e.Cancel)
            {
                return;
            }

            // Don't actually close if AutoClose == true unless explicitly called
            if (!this.auto_close && reason != ToolStripDropDownCloseReason.CloseCalled)
            {
                return;
            }

            // Detach from the tracker
            ToolStripManager.AppClicked     -= new EventHandler(ToolStripMenuTracker_AppClicked);;
            ToolStripManager.AppFocusChange -= new EventHandler(ToolStripMenuTracker_AppFocusChange);

            // Hide this dropdown
            this.Hide();

            // Owner MenuItem needs to be told to redraw (it's no longer selected)
            if (owner_item != null)
            {
                owner_item.Invalidate();
            }

            // Recursive hide all child dropdowns
            foreach (ToolStripItem tsi in this.Items)
            {
                tsi.Dismiss(reason);
            }

            SetOwnerControl(null);

            this.OnClosed(new ToolStripDropDownClosedEventArgs(reason));
        }
All Usage Examples Of System.Windows.Forms.ToolStripItem::Invalidate