ToolStripDropDownItem::DropDown Property

 

Gets or sets the ToolStripDropDown that will be displayed when this ToolStripDropDownItem is clicked.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
[TypeConverterAttribute((ReferenceConverter^::typeid))]
property ToolStripDropDown^ DropDown {
	ToolStripDropDown^ get();
	void set(ToolStripDropDown^ value);
}

Property Value

Type: System.Windows.Forms::ToolStripDropDown^

A ToolStripDropDown that is associated with the ToolStripDropDownItem.

If no ToolStripDropDown is associated with the ToolStripDropDownItem, a call to CreateDefaultDropDown creates a generic drop-down control.

System_CAPS_noteNote

If a drop-down control is automatically generated, which means that items are added to the collection, and you then set the DropDown property to an explicit drop-down control, you might lose data.

The following code example demonstrates how to assign a ContextMenuStrip control to a ToolStripDropDownItem control's DropDown property. This code example is part of a larger example provided for the ToolStripDropDownItem class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: