DesignerActionList.AutoShow Property
.NET Framework (current version)
Gets or sets a value indicating whether the smart tag panel should automatically be displayed when it is created.
Assembly: System.Design (in System.Design.dll)
Property Value
Type: System.Booleantrue if the panel should be shown when the owning component is created; otherwise, false. The default is false.
If the property value is set to true, the component with which this DesignerActionList is associated will automatically expand and display the smart tag panel when the component is created.
You can opt out of this behavior by setting the DesignerOptions.ObjectBoundSmartTagAutoShow property to false.
The following code example demonstrates how to create a collection of DesignerActionItem objects.
For a complete explanation of this code example, see How to: Attach Smart Tags to a Windows Forms Component.
Public Overrides Function GetSortedActionItems() _ As DesignerActionItemCollection Dim items As New DesignerActionItemCollection() 'Define static section header entries. items.Add(New DesignerActionHeaderItem("Appearance")) items.Add(New DesignerActionHeaderItem("Information")) 'Boolean property for locking color selections. items.Add(New DesignerActionPropertyItem( _ "LockColors", _ "Lock Colors", _ "Appearance", _ "Locks the color properties.")) If Not LockColors Then items.Add( _ New DesignerActionPropertyItem( _ "BackColor", _ "Back Color", _ "Appearance", _ "Selects the background color.")) items.Add( _ New DesignerActionPropertyItem( _ "ForeColor", _ "Fore Color", _ "Appearance", _ "Selects the foreground color.")) 'This next method item is also added to the context menu ' (as a designer verb). items.Add( _ New DesignerActionMethodItem( _ Me, _ "InvertColors", _ "Invert Colors", _ "Appearance", _ "Inverts the fore and background colors.", _ True)) End If items.Add( _ New DesignerActionPropertyItem( _ "Text", _ "Text String", _ "Appearance", _ "Sets the display text.")) 'Create entries for static Information section. Dim location As New StringBuilder("Location: ") location.Append(colLabel.Location) Dim size As New StringBuilder("Size: ") size.Append(colLabel.Size) items.Add( _ New DesignerActionTextItem( _ location.ToString(), _ "Information")) items.Add( _ New DesignerActionTextItem( _ size.ToString(), _ "Information")) Return items End Function
.NET Framework
Available since 2.0
Available since 2.0
Show: