Back to Devexpress

BarItem.RibbonStyle Property

wpf-devexpress-dot-xpf-dot-bars-dot-baritem-ddd8e3e0.md

latest6.3 KB
Original Source

BarItem.RibbonStyle Property

Gets or sets the options that specify the bar item link’s possible states within a RibbonControl. This is a dependency property.

Namespace : DevExpress.Xpf.Bars

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public RibbonItemStyles RibbonStyle { get; set; }
vb
Public Property RibbonStyle As RibbonItemStyles

Property Value

TypeDescription
RibbonItemStyles

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

|

Available values:

NameDescription
Default

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

| | Large |

If active, a bar item link can be represented by a large image with a caption.

| | SmallWithText |

If active, a bar item link can be represented by a small image with a caption.

| | SmallWithoutText |

If active, a bar item link can be represented by a small image.

| | All |

If active, enables all other options.

|

Remarks

For bar item links displayed within a RibbonControl, you can customize which states these objects support. You can customize these settings for bar item links and corresponding bar items via the BarItemLinkBase.RibbonStyle and BarItem.RibbonStyle properties, respectively.

A link’s RibbonStyle property has a higher priority than the corresponding bar item’s RibbonStyle property. If a bar item link’s BarItemLinkBase.RibbonStyle property is set to Default , the corresponding bar item’s property is used. Otherwise, the bar item’s RibbonStyle property is ignored.

The following code snippets (auto-collected from DevExpress Examples) contain references to the RibbonStyle property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheet-bind-spreadsheet-to-ms-sql-server-database/CS/WpfSpreadsheet_BindToDataSource/MainWindow.xaml#L33

xml
<dxb:BarButtonItem x:Name="biEditPaste" Command="{Binding EditPaste, Mode=OneTime, Source={StaticResource commands}}" />
<dxb:BarButtonItem x:Name="biEditCut" Command="{Binding EditCut, Mode=OneTime, Source={StaticResource commands}}" RibbonStyle="SmallWithText" />
<dxb:BarButtonItem x:Name="biEditCopy" Command="{Binding EditCopy, Mode=OneTime, Source={StaticResource commands}}" RibbonStyle="SmallWithText" />

wpf-spreadsheet-assign-custom-in-place-editors/CS/WpfSpreadsheet_CustomCellEditors/MainWindow.xaml#L33

xml
<dxb:BarButtonItem x:Name="biEditPaste" Command="{Binding EditPaste, Mode=OneTime, Source={StaticResource commands}}" />
<dxb:BarButtonItem x:Name="biEditCut" Command="{Binding EditCut, Mode=OneTime, Source={StaticResource commands}}" RibbonStyle="SmallWithText" />
<dxb:BarButtonItem x:Name="biEditCopy" Command="{Binding EditCopy, Mode=OneTime, Source={StaticResource commands}}" RibbonStyle="SmallWithText" />

wpf-create-a-ribboncontrol/CS/RibbonControl_Ex/MainWindow.xaml#L121

xml
Hint="Creates a blank document."
RibbonStyle="Large"/>

wpf-spreadsheet-bind-a-worksheet-to-generic-list-or-bindinglist-data-source/CS/DataBindingToListExample/MainWindow.xaml#L28

xml
<dxb:BarButtonItem x:Name="biEditPaste" Command="{Binding EditPaste, Mode=OneTime, Source={StaticResource commands}}"/>
<dxb:BarButtonItem x:Name="biEditCut" Command="{Binding EditCut, Mode=OneTime, Source={StaticResource commands}}" RibbonStyle="SmallWithText"/>
<dxb:BarButtonItem x:Name="biEditCopy" Command="{Binding EditCopy, Mode=OneTime, Source={StaticResource commands}}" RibbonStyle="SmallWithText"/>

wpf-scheduler-apply-end-user-restrictions/CS/WpfApplication1/MainWindow.xaml#L48

xml
<dxr:RibbonPageGroup Caption="Restrictions">
    <dxb:BarCheckItem x:Name="barItemDisableCreatingAppointments" Content="Disable Creating Appointments" RibbonStyle="Large" LargeGlyph="{dx:DXImage Image=Cancel_32x32.png}" />
    <dxb:BarCheckItem x:Name="barItemDisableAppointmentConflicts" Content="Disable Appointment Conflicts" RibbonStyle="Large" LargeGlyph="{dx:DXImage Image=Cancel_32x32.png}" />

See Also

RibbonStyle

BarItem Class

BarItem Members

DevExpress.Xpf.Bars Namespace