In This Article

RibbonViewModel Class

Represents a view model for a ribbon control.

public class RibbonViewModel : ObservableObjectBase, IHasTag
Inheritance:
object ObservableObjectBase object
Implements:
IHasTag

Constructors

RibbonViewModel()

Initializes an instance of the class in Classic layout mode.

public RibbonViewModel()

RibbonViewModel(RibbonLayoutMode)

Initializes an instance of the class in the specified layout mode.

public RibbonViewModel(RibbonLayoutMode layoutMode)
Parameter Type Description
layoutMode RibbonLayoutMode

Properties

AllowLabelsOnQuickAccessToolBar

Indicates whether the quick-access toolbar allows labels when it is below the ribbon.

public bool AllowLabelsOnQuickAccessToolBar { get; set; }

Property Value

bool:

The default value is false.

ApplicationButton

A RibbonApplicationButtonViewModel for the application button.

public RibbonApplicationButtonViewModel? ApplicationButton { get; set; }

Property Value

RibbonApplicationButtonViewModel

AreTabsVisible

Indicates whether tabs are visible above the ribbon's main content area.

public bool AreTabsVisible { get; set; }

Property Value

bool:

The default value is true.

Backstage

A RibbonApplicationButtonViewModel for the optional Backstage.

public RibbonBackstageViewModel? Backstage { get; set; }

Property Value

RibbonBackstageViewModel

CanChangeLayoutMode

Indicates whether the end user can change the layout mode.

public bool CanChangeLayoutMode { get; set; }

Property Value

bool:

true if the end user can change the layout mode; otherwise, false. The default value is true.

ClearFooterCommand

A command that, when invoked, will clear the footer.

public ICommand? ClearFooterCommand { get; set; }

Property Value

ICommand:

An ICommand. The default value is a command that sets the Footer property to null.

CollapseThresholdSize

The threshold System.Windows.Size that triggers a ribbon collapse if the ribbon is sized smaller than the threshold.

public Size? CollapseThresholdSize { get; set; }

Property Value

Size:

The default value is 270, 170.

ContextualTabGroups

The collection of optional contextual tab groups within the ribbon.

public ObservableCollection<RibbonContextualTabGroupViewModel> ContextualTabGroups { get; }

Property Value

ObservableCollection<RibbonContextualTabGroupViewModel>

A RibbonFooterViewModel for the optional footer.

public RibbonFooterViewModel? Footer { get; set; }

Property Value

RibbonFooterViewModel

GroupLabelMode

The RibbonGroupLabelMode that specifies when a RibbonGroup is labeled.

public RibbonGroupLabelMode GroupLabelMode { get; set; }

Property Value

RibbonGroupLabelMode:

The default value is Default.

IsApplicationButtonVisible

Indicates whether the application button is visible.

public bool IsApplicationButtonVisible { get; set; }

Property Value

bool:

true if the application button is visible; otherwise, false. The default value is true.

IsCollapsible

Indicates whether the ribbon collapses when it becomes smaller than a minimum threshold width/height as specified by the CollapseThresholdSize property.

public bool IsCollapsible { get; set; }

Property Value

bool:

true if the ribbon auto-collapsed when it becomes smaller than the threshold; otherwise, false. The default value is true.

IsMinimizable

Indicates whether the ribbon is minimizable.

public bool IsMinimizable { get; set; }

Property Value

bool:

true if the ribbon is minimizable; otherwise, false. The default value is true.

IsOptionsButtonVisible

Indicates whether the options button is visible.

public bool IsOptionsButtonVisible { get; set; }

Property Value

bool:

true if the options button is visible; otherwise, false. The default value is true.

ItemContainerTemplateSelector

The BarControlTemplateSelector that creates UI controls for bar control view models.

public BarControlTemplateSelector ItemContainerTemplateSelector { get; set; }

Property Value

BarControlTemplateSelector

LayoutMode

A RibbonLayoutMode that indicates the current layout mode (Classic vs. Simplified).

public RibbonLayoutMode LayoutMode { get; set; }

Property Value

RibbonLayoutMode:

The default value is Classic.

QuickAccessToolBar

A RibbonQuickAccessToolBarViewModel for the quick-access toolbar.

public RibbonQuickAccessToolBarViewModel? QuickAccessToolBar { get; set; }

Property Value

RibbonQuickAccessToolBarViewModel

QuickAccessToolBarLocation

A RibbonQuickAccessToolBarLocation that indicates the current location of the quick-access toolbar.

public RibbonQuickAccessToolBarLocation QuickAccessToolBarLocation { get; set; }

Property Value

RibbonQuickAccessToolBarLocation:

The default value is Above.

QuickAccessToolBarMode

A RibbonQuickAccessToolBarMode that indicates the current display mode for the quick-access toolbar.

public RibbonQuickAccessToolBarMode QuickAccessToolBarMode { get; set; }

Property Value

RibbonQuickAccessToolBarMode:

The default value is Visible.

SelectedItem

A RibbonTabViewModel for the currently selected tab.

public RibbonTabViewModel? SelectedItem { get; set; }

Property Value

RibbonTabViewModel

TabRowToolBar

A RibbonTabRowToolBarViewModel for the tab row toolbar that optionally appears to the right of the tabs.

public RibbonTabRowToolBarViewModel? TabRowToolBar { get; set; }

Property Value

RibbonTabRowToolBarViewModel

Tabs

The collection of tabs within the ribbon.

public ObservableCollection<RibbonTabViewModel> Tabs { get; }

Property Value

ObservableCollection<RibbonTabViewModel>

Tag

A user-defined object attached to the control.

public object? Tag { get; set; }

Property Value

object

UserInterfaceDensity

A UserInterfaceDensity that indicates how compact or spacious the UI should appear.

public UserInterfaceDensity UserInterfaceDensity { get; set; }

Property Value

UserInterfaceDensity:

The default value is Compact.

Methods

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Inherited Members

Extension Methods