RibbonViewModel Class
Represents a view model for a ribbon control.
public class RibbonViewModel : ObservableObjectBase, INotifyPropertyChanged
- Inheritance:
- System.Object ObservableObjectBase Object
Constructors
RibbonViewModel()
Initializes a new instance of the class in Classic layout mode.
public RibbonViewModel()
RibbonViewModel(RibbonLayoutMode)
Initializes a new instance of the class in the specified layout mode.
public RibbonViewModel(RibbonLayoutMode layoutMode)
| Parameter | Type | Description |
|---|---|---|
| layoutMode | RibbonLayoutMode |
Properties
ApplicationButton
Gets or sets a RibbonApplicationButtonViewModel for the application button.
public RibbonApplicationButtonViewModel ApplicationButton { get; set; }
Property Value
- RibbonApplicationButtonViewModel:
A RibbonApplicationButtonViewModel for the application button.
Backstage
Gets or sets a RibbonApplicationButtonViewModel for the optional Backstage.
public RibbonBackstageViewModel Backstage { get; set; }
Property Value
- RibbonBackstageViewModel:
A RibbonApplicationButtonViewModel for the optional Backstage.
CanChangeLayoutMode
Gets or sets whether the end user can change the layout mode.
public bool CanChangeLayoutMode { get; set; }
Property Value
- System.Boolean:
trueif the end user can change the layout mode; otherwise,false. The default value istrue.
CollapseThresholdSize
Gets or sets 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
- System.Windows.Size:
The threshold System.Windows.Size that triggers a ribbon collapse if the ribbon is sized smaller than the threshold. The default value is
270, 170.
ContextualTabGroups
Gets the collection of optional contextual tab groups within the ribbon.
public ObservableCollection<RibbonContextualTabGroupViewModel> ContextualTabGroups { get; }
Property Value
- System.Collections.ObjectModel.ObservableCollection<RibbonContextualTabGroupViewModel>:
The collection of optional contextual tab groups within the ribbon.
Footer
Gets or sets a RibbonFooterViewModel for the optional footer.
public RibbonFooterViewModel Footer { get; set; }
Property Value
- RibbonFooterViewModel:
A RibbonFooterViewModel for the optional footer.
IsApplicationButtonVisible
Gets or sets whether the application button is visible.
public bool IsApplicationButtonVisible { get; set; }
Property Value
- System.Boolean:
trueif the application button is visible; otherwise,false. The default value istrue.
IsCollapsible
Gets or sets 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
- System.Boolean:
trueif the ribbon auto-collapsed when it becomes smaller than the threshold; otherwise,false. The default value istrue.
IsMinimizable
Gets or sets whether the ribbon is minimizable.
public bool IsMinimizable { get; set; }
Property Value
- System.Boolean:
trueif the ribbon is minimizable; otherwise,false. The default value istrue.
ItemContainerTemplateSelector
Gets or sets the BarControlTemplateSelector that creates UI controls for bar control view models.
public BarControlTemplateSelector ItemContainerTemplateSelector { get; set; }
Property Value
- BarControlTemplateSelector:
The BarControlTemplateSelector that creates UI controls for bar control view models.
LayoutMode
Gets or sets a RibbonLayoutMode that indicates the current layout mode (Classic vs. Simplified).
public RibbonLayoutMode LayoutMode { get; set; }
Property Value
- RibbonLayoutMode:
A RibbonLayoutMode that indicates the current layout mode. The default value is Classic.
QuickAccessToolBar
Gets or sets a RibbonQuickAccessToolBarViewModel for the quick-access toolbar.
public RibbonQuickAccessToolBarViewModel QuickAccessToolBar { get; set; }
Property Value
- RibbonQuickAccessToolBarViewModel:
A RibbonQuickAccessToolBarViewModel for the quick-access toolbar.
QuickAccessToolBarLocation
Gets or sets a RibbonQuickAccessToolBarLocation that indicates the current location of the quick-access toolbar.
public RibbonQuickAccessToolBarLocation QuickAccessToolBarLocation { get; set; }
Property Value
- RibbonQuickAccessToolBarLocation:
A RibbonQuickAccessToolBarLocation that indicates the current location of the quick-access toolbar. The default value is Above.
QuickAccessToolBarMode
Gets or sets a RibbonQuickAccessToolBarMode that indicates the current display mode for the quick-access toolbar.
public RibbonQuickAccessToolBarMode QuickAccessToolBarMode { get; set; }
Property Value
- RibbonQuickAccessToolBarMode:
A RibbonQuickAccessToolBarMode that indicates the current display mode for the quick-access toolbar. The default value is Visible.
TabRowToolBar
Gets or sets a RibbonTabRowToolBarViewModel for the tab row toolbar that optionally appears to the right of the tabs.
public RibbonTabRowToolBarViewModel TabRowToolBar { get; set; }
Property Value
- RibbonTabRowToolBarViewModel:
A RibbonTabRowToolBarViewModel for the tab row toolbar that optionally appears to the right of the tabs.
Tabs
Gets the collection of tabs within the ribbon.
public ObservableCollection<RibbonTabViewModel> Tabs { get; }
Property Value
- System.Collections.ObjectModel.ObservableCollection<RibbonTabViewModel>:
The collection of tabs within the ribbon.
UserInterfaceDensity
Gets or sets a UserInterfaceDensity that indicates how compact or spacious the UI should appear.
public UserInterfaceDensity UserInterfaceDensity { get; set; }
Property Value
- UserInterfaceDensity:
A UserInterfaceDensity that indicates how compact or spacious the UI should appear. The default value is Compact.
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- System.String:
A string that represents the current object.
Inherited Members
- ObservableObjectBase.NotifyPropertyChanged(String)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.PropertyChanged
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()