In This Article

BarCustomControlLink Class

Represents a bar custom control command link.

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

Constructors

Initializes an instance of the class.

public BarCustomControlLink(BarCustomControlCommand command, Control control)
Parameter Type Description
command BarCustomControlCommand

The BarCommand upon which the link is based.

control Control

The control represented by the link.

Properties

The Control that is wrapped by the command link.

[Browsable(false)]
public Control? Control { get; }

Property Value

Control

Remarks

This property should only be null once disposed.

Indicates whether the control should be visible.

protected virtual bool ControlVisible { get; }

Property Value

bool:

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

Indicates whether the command link is visible.

protected override bool VisibleCore { get; set; }

Property Value

bool:

true if the command link is visible; otherwise, false.

Methods

Blurs (removes) focus from the control.

public virtual void Blur()

Blurs (removes) focus from the control.

public void Blur(bool moveFocus)
Parameter Type Description
moveFocus bool

Whether to also move focus.

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 virtual void Focus()

Raises the Enabled event.

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

The event data.

Occurs when the command link control gets focus.

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

The event data.

Occurs when the command link control loses focus.

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

The event data.

Invoked when logical parent is changed. This is invoked after the parent has changed, and the purpose is to allow elements to perform actions based on the changed parent.

protected override void OnParentChanged()

Inherited Members

Extension Methods