In This Article

BarExpanderButtonLink Class

Represents a bar expander button command link.

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

Constructors

Initializes a new instance of the BarExpanderButtonLink class.

public BarExpanderButtonLink(BarExpanderButtonCommand command)
Parameter Type Description
command BarExpanderButtonCommand

The BarCommand upon which the link is based.

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

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

enabled Boolean

Whether the button is enabled.

beginAGroup Boolean

Whether to begin a group.

Properties

Gets the BarExpanderButtonCommand to link to.

public BarExpanderButtonCommand Command { get; }

Property Value

BarExpanderButtonCommand:

The BarExpanderButtonCommand to link to.

Gets or sets whether to display the popup menu using a toolbar style.

public DefaultableBoolean UseToolBarStyleForPopupMenu { get; set; }

Property Value

DefaultableBoolean:

A DefaultableBoolean that indicates if a toolbar style should be used.

Remarks

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

Methods

Creates a copy of the BarCommandLink.

public override BarCommandLink Clone()

Returns

BarCommandLink:

The copy of the BarCommandLink.

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.

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

Boolean:

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

A MouseEventArgs that contains the event data.

Raises the MouseEnter event.

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

A MouseEventArgs that contains the event data.

Raises the MouseDown event.

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

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

Boolean:

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.

Explicit Interface Implementations

Gets whether the popup can show in customize mode.

bool IBarPopupCommandLink.CanPopupInCustomizeMode { get; }

Returns

Boolean:

true if the popup can show in customize mode; otherwise, false.

Gets whether the popup menu can be torn-off onto a DockableToolBar.

bool IBarPopupCommandLink.CanTearOff { get; }

Returns

Boolean:

true if the popup menu can be torn-off onto a DockableToolBar; otherwise, false.

Gets the BarCommandLinkCollection containing the command links for use in the button's popup.

BarCommandLinkCollection IBarPopupCommandLink.CommandLinks { get; }

Returns

BarCommandLinkCollection:

The BarCommandLinkCollection containing the command links for use in the button's popup.

Shows the popup for the command link.

bool IBarPopupCommandLink.ShowPopup()

Returns

Boolean:

true if the popup was displayed; otherwise, false.

Gets the key of the DockableToolBar that is created if a tear-off occurs.

string IBarPopupCommandLink.TearOffDockableToolBarKey { get; }

Returns

String:

The key of the DockableToolBar that is created if a tear-off occurs.

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

bool IBarPopupCommandLink.UseToolBarStyleForPopupMenu { get; }

Returns

Boolean:

true if a toolbar style should be used; otherwise, false.

Inherited Members