In This Article

BarExpanderButtonLink Class

Represents a bar expander button command link.

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

Constructors

Initializes an instance of the class.

public BarExpanderButtonLink(BarExpanderButtonCommand command)
Parameter Type Description
command BarExpanderButtonCommand

The BarCommand upon which the link is based.

Initializes an instance of the class, for use in a programmatically created popup menu.

public BarExpanderButtonLink(string category, string name, string? text = null, int imageIndex = -1, bool? enabled = null, bool? beginAGroup = null)
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 ImageList.

enabled bool?

Whether the button is enabled. When null, the default value is assigned (which is true unless overridden by a derived class).

beginAGroup bool?

Whether to begin a group. When null, the default value is assigned (which is false unless overridden by a derived class).

Properties

The BarExpanderButtonCommand to link to.

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

Property Value

BarExpanderButtonCommand

Indicates whether to display the popup menu using a toolbar style.

public DefaultableBoolean UseToolBarStyleForPopupMenu { get; set; }

Property Value

DefaultableBoolean

Remarks

If set to Default the resolved value will use the command's setting.

Methods

Creates a copy of the BarCommandLink.

public override BarCommandLink Clone()

Returns

BarCommandLink

The UIElementDrawState for the element.

public override UIElementDrawState GetDrawState()

Returns

UIElementDrawState

Remarks

The default implementation of this method returns None.

Returns whether the command link is different from the specified BarCommandLink.

protected override bool IsDifferentFromDefault(BarCommandLink defaultCommandLink)
Parameter Type Description
defaultCommandLink BarCommandLink

The BarCommandLink to examine.

Returns

bool:

true if the command link is different from the specified BarCommandLink.

Raises the MouseDown event.

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

The event data.

Raises the MouseEnter event.

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

The event data.

Raises the MouseUp event.

protected override void OnMouseUp(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.

Deserializes the attribute data for the BarCommandLink from XML.

protected override void ReadAttributesFromXml(BarLayoutXmlSerializer serializer)
Parameter Type Description
serializer BarLayoutXmlSerializer

The BarLayoutXmlSerializer to use.

Resets the UseToolBarStyleForPopupMenu property to its default value.

public virtual void ResetUseToolBarStyleForPopupMenu()

Indicates whether the UseToolBarStyleForPopupMenu property should be persisted.

public virtual bool ShouldSerializeUseToolBarStyleForPopupMenu()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

Serializes the attribute data for the BarCommandLink to XML.

protected override void WriteAttributesToXml(BarLayoutXmlSerializer serializer, BarCommandLink? defaultCommandLink)
Parameter Type Description
serializer BarLayoutXmlSerializer

The BarLayoutXmlSerializer to use.

defaultCommandLink BarCommandLink

The default BarCommandLink that is used for differential layout comparison.

Inherited Members

Extension Methods