In This Article

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, Int32)

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 Int32

The index of an image within an ImageList.

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

Int32:

The width of the ComboBox drop-down. A value of -1, the default, makes the drop-down the same size as the ComboBox link.

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

Int32:

The selected index of the ComboBox drop-down.

SelectedItem

Gets the selected item in the Items collection.

public object SelectedItem { get; }

Property Value

Object:

The selected item in the Items collection.

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.

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 BarCommandLinkEventArgs that contains the event data.

OnSelectedIndexChanged(EventArgs)

Raises the SelectedIndexChanged event.

protected virtual void OnSelectedIndexChanged(EventArgs e)
Parameter Type Description
e EventArgs

A EventArgs that contains the event data.

OnStyleChanged(EventArgs)

Raises the StyleChanged event.

protected virtual void OnStyleChanged(EventArgs e)
Parameter Type Description
e EventArgs

A EventArgs that contains the event data.

RaiseClickEvent(BarCommandLinkEventArgs)

Raises the Click event.

public void RaiseClickEvent(BarCommandLinkEventArgs e)
Parameter Type Description
e BarCommandLinkEventArgs

A BarCommandLinkEventArgs that contains 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

Boolean:

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

Boolean:

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

Boolean:

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

Boolean:

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.

public event BarCommandLinkEventHandler Click

Event Type

BarCommandLinkEventHandler

SelectedIndexChanged

Occurs when the SelectedIndex property is changed.

public event EventHandler SelectedIndexChanged

Event Type

EventHandler

StyleChanged

Occurs when the Style property is changed.

public event EventHandler StyleChanged

Event Type

EventHandler

Inherited Members