In This Article

BarComboBoxLink Class

Represents a bar combobox command link.

public class BarComboBoxLink : BarCustomControlLink, IInputElement, IUIElement, ILogicalTreeNode, IDisposable, IImageListProvider
Inheritance:
Object MarshalByRefObject DisposableObject LogicalTreeNodeBase UIElement BarCommandLink BarCustomControlLink Object
Implements:
IInputElement IUIElement ILogicalTreeNode IDisposable IImageListProvider

Constructors

Initializes a new instance of the BarComboBoxLink class.

public BarComboBoxLink(BarComboBoxCommand command)
Parameter Type Description
command BarComboBoxCommand

The BarCommand upon which the link is based.

Properties

Gets the BarComboBoxCommand to link to.

public BarComboBoxCommand Command { get; }

Property Value

BarComboBoxCommand:

The BarComboBoxCommand to link to.

Gets whether the control should be visible.

protected override bool ControlVisible { get; }

Property Value

Boolean:

true if the control should be visible; otherwise, false.

Gets whether the drop-down is currently displayed.

public bool DropDownDisplayed { get; }

Property Value

Boolean:

true if the drop-down is currently displayed; otherwise, false.

Gets whether to invalidate the element when mouse events occur.

protected override bool InvalidateOnMouseEvents { get; }

Property Value

Boolean:

true if the element should be invalidated when mouse events occur.

Methods

Positions child elements and determines an arrange size.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

Size:

The actual size used.

Remarks

Element authors should override this method, call Arrange on each visible child element and position each child element. It is required that a parent element calls Arrange on each child or they won't be rendered.

Disposes any resources used by the object.

protected override void Dispose(bool disposing)
Parameter Type Description
disposing Boolean

Whether the object is being disposed.

Sets focus to the control.

public override void Focus()

Gets the bounds of the button of the combobox.

public Rectangle GetButtonBounds()

Returns

Rectangle:

The bounds of the button of the combobox.

Gets the Cursor that should be used when the mouse is over the element at the specified Point.

public override Cursor GetCursor(Point point)
Parameter Type Description
point Point

The Point to examine.

Returns

Cursor:

The Cursor that should be used when the mouse is over the element at the specified Point.

Gets the UIElementDrawState for the element.

public UIElementDrawState GetDrawState()

Returns

UIElementDrawState:

The UIElementDrawState for the element.

Remarks

The default implementation of this method returns UIElementDrawState.None.

Occurs when the command link control gets focus.

protected override void OnGotFocus(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

Occurs when the value of the IsSelected property changes.

protected override void OnIsSelectedChanged(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

Occurs when the command link control loses focus.

protected override void OnLostFocus(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

Raises the MouseDown event.

protected override void OnMouseDown(MouseEventArgs e)
Parameter Type Description
e MouseEventArgs

A MouseEventArgs that contains the event data.

Renders the element.

protected override void OnRender(PaintEventArgs e)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

Process a key that is pressed down.

protected override DefaultableBoolean ProcessKeyDown(Keys key)
Parameter Type Description
key Keys

A Keys indicating the key that was pressed.

Returns

DefaultableBoolean:

DefaultableBoolean.True if the key was handled. DefaultableBoolean.Default if the key was not handled but should be allowed to process to the appropriate control. DefaultableBoolean.False if the key was not handled and the BarManager should process the key.

Inherited Members