System.Windows.Forms.ToolStripDropDown.Show C# (CSharp) Method

Show() private method

private Show ( ) : void
return void
		public new void Show ()
		{
			Show (Location, DefaultDropDownDirection);
		}
		

Same methods

ToolStripDropDown::Show ( Control control, Point position ) : void
ToolStripDropDown::Show ( Control control, Point position, ToolStripDropDownDirection direction ) : void
ToolStripDropDown::Show ( Control control, int x, int y ) : void
ToolStripDropDown::Show ( Point screenLocation ) : void
ToolStripDropDown::Show ( Point position, ToolStripDropDownDirection direction ) : void
ToolStripDropDown::Show ( int x, int y ) : void

Usage Example

Example #1
0
        internal void CreateToolStrip()
        {
            if (Enabled == false)
            {
                return;
            }

            if (dropDownItems.Count == 0)
            {
                return;
            }

            var dropDownBounds = new Rectangle(Point.Empty, Owner.Size);

            for (int i = 0; i < dropDownItems.Count; i++) // Reset items.
            {
                var item = dropDownItems[i];
                item.Unselect();

                var dropDownItem = item as ToolStripDropDownItem;
                if (dropDownItem == null)
                {
                    continue;
                }

                dropDownItem.ArrowImage = ApplicationResources.Images.DropDownRightArrow;
                dropDownItem.ArrowColor = Color.Black;
            }

            var direction = ToolStripDropDownDirection.Right;

            if (Owner.IsDropDown == false)
            {
                direction = ToolStripDropDownDirection.BelowRight;
            }

            dropDownToolStrip = userDropDown == null
                ? new ToolStripDropDownMenu()
                : userDropDown;
            dropDownToolStrip.OwnerItem = this;
            dropDownToolStrip.Items.AddRange(dropDownItems);
            dropDownToolStrip.selectedItem   = dropDownToolStrip.SelectNextToolStripItem(null, true);
            dropDownToolStrip.shouldFixWidth = true;
            dropDownToolStrip.direction      = direction;
            dropDownToolStrip.Location       = DropDownDirectionToDropDownBounds(direction, dropDownBounds).Location;
            dropDownToolStrip.Disposed      += DropDownToolStrip_Disposed;
            dropDownToolStrip.Show(dropDownToolStrip.Location);

            if (uwfDropDownCreated != null)
            {
                uwfDropDownCreated(dropDownToolStrip);
            }

            pressed = true;
        }
All Usage Examples Of System.Windows.Forms.ToolStripDropDown::Show