Back to Devexpress

BarButtonItemLink Class

windowsforms-devexpress-dot-xtrabars-59d16665.md

latest3.6 KB
Original Source

BarButtonItemLink Class

A bar item link to BarButtonItem.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public class BarButtonItemLink :
    BarBaseButtonItemLink
vb
Public Class BarButtonItemLink
    Inherits BarBaseButtonItemLink

Remarks

A bar item link is a visual representation of a bar item (BarButtonItem) that is displayed in the Ribbon UI, toolbars, and menus. The bar button item can have multiple links (see the image below). The bar item’s settings specify the default behavior and appearance of its links. The BarButtonItemLink class contains settings that allow you to customize a certain link.

csharp
using DevExpress.XtraBars;
using DevExpress.XtraBars.Ribbon;

// Customizes the links of a bar button item.
(barButtonItem1.Links[1] as BarButtonItemLink).UserRibbonStyle = RibbonItemStyles.SmallWithoutText;
(barButtonItem1.Links[2] as BarButtonItemLink).UserRibbonStyle = RibbonItemStyles.SmallWithText;
vb
Imports DevExpress.XtraBars
Imports DevExpress.XtraBars.Ribbon

' Customizes the links of a bar button item.
TryCast(barButtonItem1.Links(1), BarButtonItemLink).UserRibbonStyle = RibbonItemStyles.SmallWithoutText
TryCast(barButtonItem1.Links(2), BarButtonItemLink).UserRibbonStyle = RibbonItemStyles.SmallWithText

Read the following topic for detailed information and examples: Bar Item Links.

Note

Button Items (BarButtonItem) do not support large images when displayed in toolbars. Use Large Button Items (BarLargeButtonItem) to display large images in toolbars. Use the ImageOptions property to specify image settings.

Read the following article for general information on how to specify images in DevExpress UI controls for WinForms:

Display Images in Controls - WinForms Cheat Sheet.

Inheritance

Object BarItemLink BarBaseButtonItemLink BarButtonItemLink BarLargeButtonItemLink

RibbonGalleryBarItemLink

See Also

BarButtonItemLink Members

BarButtonItem

Bar Item Links

DevExpress.XtraBars Namespace