In This Article

BarSplitButtonLink Class

Represents a bar split button command link.

[TypeConverter(typeof(BarSplitButtonLinkConverter))]
public class BarSplitButtonLink : 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 BarSplitButtonLink(BarSplitButtonCommand command)
Parameter Type Description
command BarSplitButtonCommand

The BarCommand upon which the link is based.

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

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

checkable bool?

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

isChecked bool?

Whether the button is currently checked. When null, the default value is assigned (which is false 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 BarSplitButtonCommand to link to.

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

Property Value

BarSplitButtonCommand

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

[Browsable(false)]
public BarCommandLinkCollection CommandLinks { get; }

Property Value

BarCommandLinkCollection

Indicates 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 Default, the resolved value will use the command's setting.

Methods

Creates a copy of the BarCommandLink.

public override BarCommandLink Clone()

Returns

BarCommandLink

Returns the UIElementDrawState for the button element.

public UIElementDrawState GetButtonDrawState()

Returns

UIElementDrawState

Returns the UIElementDrawState for the popup element.

public UIElementDrawState GetPopupDrawState()

Returns

UIElementDrawState

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.

Performs processing based on some sort of event.

protected override void Process(BarProcessEventArgs e)
Parameter Type Description
e BarProcessEventArgs

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.

Deserializes a child element for the BarCommandLink from XML.

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

Serializes the child element data for the BarCommandLink to XML.

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