Back to Devexpress

RibbonForm.Ribbon Property

windowsforms-devexpress-dot-xtrabars-dot-ribbon-dot-ribbonform-48355f03.md

latest2.8 KB
Original Source

RibbonForm.Ribbon Property

Gets or sets a RibbonControl displayed within the form.

Namespace : DevExpress.XtraBars.Ribbon

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
[DefaultValue(null)]
public virtual RibbonControl Ribbon { get; set; }
vb
<Browsable(False)>
<DefaultValue(Nothing)>
Public Overridable Property Ribbon As RibbonControl

Property Value

TypeDefaultDescription
RibbonControlnull

A RibbonControl displayed within the form.

|

Remarks

It’s possible to display one Ribbon Control within a RibbonForm at a time. Use the Ribbon property to access the RibbonControl displayed within the form.

When you create a RibbonControl at runtime and add it to the form’s Controls collection, the control is automatically assigned to the Ribbon property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Ribbon 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.

xaf-win-gantt-control/CS/EF/GanttSolution/GanttSolution.Win/Controllers/RibbonCustomizationWindowController.cs#L21

csharp
RibbonForm ribbonForm = Frame.Template as RibbonForm;
if(ribbonForm != null && ribbonForm.Ribbon != null) {
    ribbonControl = ribbonForm.Ribbon;

See Also

RibbonVisibility

StatusBar

RibbonForm Class

RibbonForm Members

DevExpress.XtraBars.Ribbon Namespace