In This Article

BarComboBoxLink Class

Represents a bar combobox command link.

[TypeConverter(typeof(BarComboBoxLinkConverter))]
public class BarComboBoxLink : BarCustomControlLink, IInputElement, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable, IImageListProvider
Inheritance:
object MarshalByRefObject MarshalByRefDisposableObject LogicalTreeNodeBase UIElement BarCommandLink BarCustomControlLink object
Implements:
IInputElement IUIElement ILogicalTreeNode IDpiAwareElement IDisposable IImageListProvider

Constructors

Initializes an instance of the class.

public BarComboBoxLink(BarComboBoxCommand command)
Parameter Type Description
command BarComboBoxCommand

The BarCommand upon which the link is based.

Properties

The BarComboBoxCommand to link to.

[Browsable(false)]
public BarComboBoxCommand Command { get; }

Property Value

BarComboBoxCommand

Indicates whether the control should be visible.

protected override bool ControlVisible { get; }

Property Value

bool:

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

Indicates whether the drop-down is currently displayed.

[Browsable(false)]
public bool DropDownDisplayed { get; }

Property Value

bool:

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

Indicates whether to invalidate the element when mouse events occur.

protected override bool InvalidateOnMouseEvents { get; }

Property Value

bool:

true if the element should be invalidated when mouse events occur; otherwise, false.

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(Rectangle) on each visible child element and position each child element. It is required that a parent element calls Arrange(Rectangle) on each child or they won't be rendered.

Releases the unmanaged resources used by the object and optionally releases the managed resources.

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

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

This method is called by the public Dispose method and the Finalize method. Dispose invokes this method with the disposing parameter set to true. Finalize invokes this method with disposing set to false.

Sets focus to the control.

public override void Focus()

Returns the bounds of the button of the combobox.

public Rectangle GetButtonBounds()

Returns

Rectangle

Returns 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 UIElementDrawState for the element.

public override UIElementDrawState GetDrawState()

Returns

UIElementDrawState

Remarks

The default implementation of this method returns None.

Occurs when the value of the IsSelected property changes.

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

The event data.

Occurs when the command link control loses focus.

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

The event data.

Raises the MouseDown event.

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

The event data.

Renders the element.

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

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:

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

Inherited Members

Extension Methods