BarComboBoxCommand Class
Represents a bar combobox command.
public class BarComboBoxCommand : BarCustomControlCommand, IImageListProvider, IBarClickableCommand
- Inheritance:
- object Command BarCommand BarCustomControlCommand object
- Implements:
- IImageListProvider IBarClickableCommand
Constructors
BarComboBoxCommand(string, string, string?, int)
Initializes an instance of the class.
public BarComboBoxCommand(string category, string name, string? text = null, int imageIndex = -1)
| 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 |
Properties
ControlValue
The string value of the custom control.
DropDownWidth
The width of the ComboBox drop-down.
public int DropDownWidth { get; set; }
Property Value
- int:
A value of
-1, the default, makes the drop-down the same size as the ComboBox link.
Items
The collection of items for the combobox.
public BarComboBoxCommand.ObjectCollection Items { get; }
Property Value
SelectedIndex
The selected index of the ComboBox drop-down.
SelectedItem
The selected item in the Items collection.
Style
The style of the combobox.
Methods
CloneToType(Type)
Creates a copy of the BarCommand.
protected override BarCommand CloneToType(Type targetType)
| Parameter | Type | Description |
|---|---|---|
| targetType | Type | The target Type. |
Returns
- BarCommand:
The copy of the BarCommand.
CreateCommandLink()
Creates a new BarCommandLink for the command.
OnClick(BarCommandLinkEventArgs)
Raises the Click event.
protected virtual void OnClick(BarCommandLinkEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | BarCommandLinkEventArgs | The event data. |
OnSelectedIndexChanged(EventArgs)
Raises the SelectedIndexChanged event.
protected virtual void OnSelectedIndexChanged(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnStyleChanged(EventArgs)
Raises the StyleChanged event.
protected virtual void OnStyleChanged(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | 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. |
ResetCanCustomizeKeyboardShortcuts()
Resets the CanCustomizeKeyboardShortcuts property to its default value.
public override void ResetCanCustomizeKeyboardShortcuts()
ResetDropDownWidth()
Resets the DropDownWidth property to its default value.
public virtual void ResetDropDownWidth()
ResetSelectedIndex()
Resets the SelectedIndex property to its default value.
public virtual void ResetSelectedIndex()
ResetStyle()
Resets the Style property to its default value.
public virtual void ResetStyle()
ShouldSerializeCanCustomizeKeyboardShortcuts()
Indicates whether the CanCustomizeKeyboardShortcuts property should be persisted.
public override bool ShouldSerializeCanCustomizeKeyboardShortcuts()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeDropDownWidth()
Indicates whether the DropDownWidth property should be persisted.
public virtual bool ShouldSerializeDropDownWidth()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeSelectedIndex()
Indicates whether the SelectedIndex property should be persisted.
public virtual bool ShouldSerializeSelectedIndex()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeStyle()
Indicates whether the Style property should be persisted.
public virtual bool ShouldSerializeStyle()
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. |
Events
Click
Occurs when a BarCommand is clicked.
SelectedIndexChanged
Occurs when the SelectedIndex property is changed.
StyleChanged
Occurs when the Style property is changed.
Inherited Members
- BarCustomControlCommand.ResetControlValue()
- BarCustomControlCommand.ShouldSerializeControlValue()
- BarCustomControlCommand.ResetTextVisibleOnToolBars()
- BarCustomControlCommand.ShouldSerializeTextVisibleOnToolBars()
- BarCustomControlCommand.ResetWidth()
- BarCustomControlCommand.ShouldSerializeWidth()
- BarCustomControlCommand.SupportsVerticalDisplay
- BarCustomControlCommand.Width
- BarCustomControlCommand.ControlValueChanged
- BarCommand.ResetCanCustomizeCreate()
- BarCommand.ShouldSerializeCanCustomizeCreate()
- 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.Process(BarProcessEventArgs)
- BarCommand.ResetStaysOpenOnClick()
- BarCommand.ShouldSerializeStaysOpenOnClick()
- BarCommand.ResetText()
- BarCommand.ShouldSerializeText()
- BarCommand.ResetToolTipEnabled()
- BarCommand.ShouldSerializeToolTipEnabled()
- 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.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()