Skip to main content
Bar

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BarItem.RibbonStyle Property

Gets or sets the options that specify the bar item’s possible states within a Ribbon Control.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("Behavior")]
[SupportedByBarManager(SupportedByBarManagerKind.NonSupported)]
public RibbonItemStyles RibbonStyle { get; set; }

#Property Value

Type Description
RibbonItemStyles

A set of RibbonItemStyles flags that specify the bar item’s possible states within a Ribbon Control.

Available values:

Name Description
Default

If active, an item’s possible states with a Ribbon Control are determined based on the item’s settings. For example, if the item is associated with a small image and isn’t associated with a large image, its possible states within the Ribbon Control are RibbonItemStyles.SmallWithoutText and RibbonItemStyles.SmallWithText.

Large

If active, a bar item can be displayed as a large bar item.

LargeItem

SmallWithText

If active, an item can be displayed like a smal bar item with its caption.

SmalWithTextItem

SmallWithoutText

If active, an item can be displayed like a smal bar item without its caption.

SmalWithoutTextItem

All

If active, enables all other options.

#Remarks

The following code shows how to enable and disable RibbonItemStyles options:

idNew.RibbonStyle |= DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
idNew.RibbonStyle |= DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText;
// ...
idNew.RibbonStyle &= ~DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText;

The icon size for all “small” styles is 16x16 pixels, and 32x32 pixels for “large”. To change these sizes, add a BarAndDockingController component and modify its PropertiesRibbon.DefaultGlyphSize and PropertiesRibbon.DefaultLargeGlyphSize properties.

image

barAndDockingController1.PropertiesRibbon.DefaultGlyphSize = 32;
barAndDockingController1.PropertiesRibbon.DefaultLargeGlyphSize = 64;
See Also