BarPopupButtonCommand Class
Represents a bar button command that causes a popup.
public class BarPopupButtonCommand : BarCommand, IImageListProvider, IBarPopupCommand, IHasDefaultCommandLinks
- Inheritance:
- object Command BarCommand object
Constructors
BarPopupButtonCommand(string, string, string?, int)
Initializes an instance of the class.
public BarPopupButtonCommand(string category, string name, string? text, int imageIndex)
| Parameter | Type | Description |
|---|---|---|
| category | string | The category of the bar command. |
| name | string | The name of the bar command. |
| text | string | The text caption. |
| imageIndex | int | The index of an image within an |
BarPopupButtonCommand(string, string, string?, int, bool?)
Initializes an instance of the class.
public BarPopupButtonCommand(string category, string name, string? text = null, int imageIndex = -1, bool? enabled = null)
| Parameter | Type | Description |
|---|---|---|
| category | string | The category of the bar command. |
| name | string | The name of the bar command. |
| text | string | The text caption. |
| imageIndex | int | The index of an image within an |
| enabled | bool? | Whether the button is enabled. When |
Properties
CanTearOff
Indicates whether the popup menu can be torn-off onto a DockableToolBar.
public bool CanTearOff { get; set; }
Property Value
- bool:
trueif the popup menu can be torn-off onto a DockableToolBar; otherwise,false.
DefaultCommandLinks
The BarCommandLinkCollection containing the default command links for use with the object.
public BarCommandLinkCollection DefaultCommandLinks { get; }
Property Value
TearOffDockableToolBarKey
The key of the DockableToolBar that is created if a tear-off occurs.
UseToolBarStyleForPopupMenu
Indicates whether to display the popup menu using a toolbar style.
public bool UseToolBarStyleForPopupMenu { get; set; }
Property Value
- bool:
trueif a toolbar style should be used; otherwise,false.
Methods
CloneToType(Type)
Creates a copy of the BarCommand.
protected override BarCommand CloneToType(Type targetType)
| Parameter | Type | Description |
|---|---|---|
| targetType | Type | The target Type. |
Returns
CreateCommandLink()
Creates a new BarCommandLink for the command.
Process(BarProcessEventArgs)
Performs processing based on some sort of event.
protected override void Process(BarProcessEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | BarProcessEventArgs | The event data. |
ReadAttributesFromXml(BarLayoutXmlSerializer)
Deserializes the attribute data for the BarCommandLink from XML.
protected override void ReadAttributesFromXml(BarLayoutXmlSerializer serializer)
| Parameter | Type | Description |
|---|---|---|
| serializer | BarLayoutXmlSerializer | The BarLayoutXmlSerializer to use. |
ReadElementFromXml(BarLayoutXmlSerializer)
Deserializes a child element for the BarCommandLink from XML.
protected override void ReadElementFromXml(BarLayoutXmlSerializer serializer)
| Parameter | Type | Description |
|---|---|---|
| serializer | BarLayoutXmlSerializer | The BarLayoutXmlSerializer to use. |
ResetCanTearOff()
Resets the CanTearOff property to its default value.
public virtual void ResetCanTearOff()
ResetTearOffDockableToolBarKey()
Resets the TearOffDockableToolBarKey property to its default value.
public virtual void ResetTearOffDockableToolBarKey()
ResetToolTipEnabled()
Resets the ToolTipEnabled property to its default value.
public override void ResetToolTipEnabled()
ResetUseToolBarStyleForPopupMenu()
Resets the UseToolBarStyleForPopupMenu property to its default value.
public virtual void ResetUseToolBarStyleForPopupMenu()
ShouldSerializeCanTearOff()
Indicates whether the CanTearOff property should be persisted.
public virtual bool ShouldSerializeCanTearOff()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeTearOffDockableToolBarKey()
Indicates whether the TearOffDockableToolBarKey property should be persisted.
public virtual bool ShouldSerializeTearOffDockableToolBarKey()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeToolTipEnabled()
Indicates whether the ToolTipEnabled property should be persisted.
public override bool ShouldSerializeToolTipEnabled()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeUseToolBarStyleForPopupMenu()
Indicates whether the UseToolBarStyleForPopupMenu property should be persisted.
public virtual bool ShouldSerializeUseToolBarStyleForPopupMenu()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
WriteAttributesToXml(BarLayoutXmlSerializer)
Serializes the attribute data for the BarCommand to XML.
protected override void WriteAttributesToXml(BarLayoutXmlSerializer serializer)
| Parameter | Type | Description |
|---|---|---|
| serializer | BarLayoutXmlSerializer | The BarLayoutXmlSerializer to use. |
WriteElementsToXml(BarLayoutXmlSerializer)
Serializes the child element data for the BarCommand to XML.
protected override void WriteElementsToXml(BarLayoutXmlSerializer serializer)
| Parameter | Type | Description |
|---|---|---|
| serializer | BarLayoutXmlSerializer | The BarLayoutXmlSerializer to use. |
Inherited Members
- BarCommand.ResetCanCustomizeCreate()
- BarCommand.ShouldSerializeCanCustomizeCreate()
- BarCommand.ResetCanCustomizeKeyboardShortcuts()
- BarCommand.ShouldSerializeCanCustomizeKeyboardShortcuts()
- BarCommand.ResetCategory()
- BarCommand.ShouldSerializeCategory()
- BarCommand.ResetCustomizeListText()
- BarCommand.ShouldSerializeCustomizeListText()
- BarCommand.ResetEnabled()
- BarCommand.ShouldSerializeEnabled()
- BarCommand.ResetImage()
- BarCommand.ShouldSerializeImage()
- BarCommand.ResetImageIndex()
- BarCommand.ShouldSerializeImageIndex()
- BarCommand.OnEnabledChanged(EventArgs)
- BarCommand.OnProcessingRequested(BarProcessEventArgs)
- BarCommand.ResetStaysOpenOnClick()
- BarCommand.ShouldSerializeStaysOpenOnClick()
- BarCommand.ResetText()
- BarCommand.ShouldSerializeText()
- BarCommand.ResetToolTipText()
- BarCommand.ShouldSerializeToolTipText()
- BarCommand.UpdateState(BarCommandLinkEventArgs)
- BarCommand.BarManager
- BarCommand.CanCustomizeCreate
- BarCommand.CanCustomizeKeyboardShortcuts
- BarCommand.Category
- BarCommand.CustomizeListText
- BarCommand.Enabled
- BarCommand.FullName
- BarCommand.Image
- BarCommand.ImageIndex
- BarCommand.KeyboardShortcuts
- BarCommand.Name
- BarCommand.StaysOpenOnClick
- BarCommand.SupportsVerticalDisplay
- BarCommand.Tag
- BarCommand.Text
- BarCommand.ToolTipEnabled
- BarCommand.ToolTipText
- BarCommand.EnabledChanged
- BarCommand.ProcessingRequested
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()