In This Article

BarPopupButtonLink Class

Represents a bar popup button command link.

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

Constructors

Initializes a new instance of the BarPopupButtonLink class.

public BarPopupButtonLink(BarPopupButtonCommand command)
Parameter Type Description
command BarPopupButtonCommand

The BarCommand upon which the link is based.

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

public BarPopupButtonLink(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 int

The index of an image within an ImageList.

enabled bool

Whether the button is enabled.

beginAGroup bool

Whether to begin a group.

Properties

Gets the BarPopupButtonCommand to link to.

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

Property Value

BarPopupButtonCommand:

The BarPopupButtonCommand to link to.

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

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

Property Value

BarCommandLinkCollection:

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

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.

Gets the text to use for the command link tooltips.

public override string GetToolTipText()

Returns

string:

The text to use for the command link tooltips.

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

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.

Performs processing based on some sort of event.

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

A BarProcessEventArgs 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.

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 MergeAction property to its default value.

public override void ResetMergeAction()

Resets the UseToolBarStyleForPopupMenu property to its default value.

public virtual void ResetUseToolBarStyleForPopupMenu()

Indicates whether the MergeAction property should be persisted.

public override bool ShouldSerializeMergeAction()

Returns

bool:

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

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