BarComboBoxCommand Class
Represents a bar combobox command.
public class BarComboBoxCommand : BarCustomControlCommand, IImageListProvider
- Inheritance:
- object Command BarCommand BarCustomControlCommand object
- Implements:
- IImageListProvider
Constructors
BarComboBoxCommand(string, string, string, int)
Initializes a new instance of the BarComboBoxCommand
class.
public BarComboBoxCommand(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 |
Properties
ControlValue
Gets or sets the string value of the custom control.
public override string ControlValue { get; set; }
Property Value
- string:
The string value of the custom control.
DropDownWidth
Gets or sets the width of the ComboBox drop-down.
public int DropDownWidth { get; set; }
Property Value
Items
Gets the collection of items for the combobox.
public BarComboBoxCommand.ObjectCollection Items { get; }
Property Value
- BarComboBoxCommand.ObjectCollection:
The collection of items for the combobox.
SelectedIndex
Gets or sets the selected index of the ComboBox drop-down.
public int SelectedIndex { get; set; }
Property Value
SelectedItem
Gets the selected item in the Items collection.
[Browsable(false)]
public object SelectedItem { get; }
Property Value
Style
Gets or sets the style of the combobox.
public BarComboBoxCommandStyle Style { get; set; }
Property Value
- BarComboBoxCommandStyle:
A BarComboBoxCommandStyle indicating 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.
public override BarCommandLink CreateCommandLink()
Returns
- BarCommandLink:
The BarCommandLink that was created.
OnClick(BarCommandLinkEventArgs)
Raises the Click
event.
protected virtual void OnClick(BarCommandLinkEventArgs e)
Parameter | Type | Description |
---|---|---|
e | BarCommandLinkEventArgs | A |
OnSelectedIndexChanged(EventArgs)
Raises the SelectedIndexChanged
event.
protected virtual void OnSelectedIndexChanged(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | A |
OnStyleChanged(EventArgs)
Raises the StyleChanged
event.
protected virtual void OnStyleChanged(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | A |
RaiseClickEvent(BarCommandLinkEventArgs)
Raises the Click
event.
public void RaiseClickEvent(BarCommandLinkEventArgs e)
Parameter | Type | Description |
---|---|---|
e | BarCommandLinkEventArgs | A |
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:
true
if 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:
true
if 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:
true
if 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:
true
if 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.StaysOpenOnClick
- BarCommand.Tag
- BarCommand.Text
- BarCommand.ToolTipEnabled
- BarCommand.ToolTipText
- BarCommand.EnabledChanged
- BarCommand.ProcessingRequested
- Command.Name
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()