Class RadRibbonBar
other Telerik RadControls and Windows Represents a RadRibbonBar. The RadRibbon bar visual appearance can be customized in numerous ways through themes. Also you can nest other telerik controls in the ribbon bar chunks thus creating intuitive interface for your applications. All of the application's functionality is accessible from a single ribbon. The ribbon is divided into command tabs such as Write, Insert, and Page Layout. When the users clicks on a command tab, they see chunks such as Clipboard, Font, and Paragraph. Each chunk can hold an unlimited number of controls including toolbars, comboboxes, and Forms controls.
The RadRibbonBar class is a simple wrapper for the RadRibbonBarElement class. All UI and logic functionality is implemented in RadRibbonBarElement class. RadRibbonBar acts to transfer the events to and from its RadRibbonBarElement class.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Menus & Toolbars")]
public class RadRibbonBar : RadNonClientUIControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadRibbonBar()
Fields
ExpandCollapseCommand
Command for expanding or collapsing the ribbon bar.
Declaration
public static readonly ExpandCollapseCommand ExpandCollapseCommand
Field Value
|
ExpandCollapseCommand
|
Properties
ApplicationMenuAnimantionType
Gets or sets a value indicating the type of the fade animation.
Declaration
public virtual FadeAnimationType ApplicationMenuAnimantionType { get; set; }
Property Value
|
FadeAnimationType
|
ApplicationMenuStyle
Gets or sets the application menu style for the ribbon bar.
Declaration
public virtual ApplicationMenuStyle ApplicationMenuStyle { get; set; }
Property Value
|
ApplicationMenuStyle
|
AutoSize
This property is not relevant for this class.
Declaration
public override bool AutoSize { get; set; }
Property Value
|
System.Boolean
|
Overrides
BackColor
This property is not relevant for this class.
Declaration
public override Color BackColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BackstageControl
Gets or sets the backstage control for the ribbon bar.
Declaration
public RadRibbonBarBackstageView BackstageControl { get; set; }
Property Value
|
RadRibbonBarBackstageView
|
CausesValidation
Gets or sets a flag indicating whether the control causes validation
Declaration
public bool CausesValidation { get; set; }
Property Value
|
System.Boolean
|
CloseButton
Gets or sets if the ribbon bar has close button in its caption
Declaration
public bool CloseButton { get; set; }
Property Value
|
System.Boolean
|
CollapseRibbonOnTabDoubleClick
Gets or sets a value indicating whether the ribbon bar will be collapsed or expanded on ribbon tab double click.
Declaration
public bool CollapseRibbonOnTabDoubleClick { get; set; }
Property Value
|
System.Boolean
|
CommandTabs
Gets the collection of command tabs in the ribbon bar.
Declaration
[RadDescription("CommandTabs", typeof(RadRibbonBarElement))]
[RadEditItemsAction]
[RadNewItem("Add New Tab...", true, true, false)]
public virtual RadRibbonBarCommandTabCollection CommandTabs { get; }
Property Value
|
RadRibbonBarCommandTabCollection
|
ContextualTabGroups
Gets the collection of contextual tab groups in the ribbon bar.
Declaration
[RadDescription("ContextualTabGroups", typeof(RadRibbonBarElement))]
[RadEditItemsAction]
[RadNewItem("Add Context...", true, true, false)]
public RadItemOwnerCollection ContextualTabGroups { get; }
Property Value
|
RadItemOwnerCollection
|
DefaultSize
Gets or sets the default size of the ribbon bar control.
Declaration
protected override Size DefaultSize { get; }
Property Value
|
System.Drawing.Size
A System.Drawing.Size structure representing the default size. |
Dock
Gets or sets which edge of the parent container a control is docked to.
Declaration
public override DockStyle Dock { get; set; }
Property Value
|
System.Windows.Forms.DockStyle
|
EnableKeyboardNavigation
EnableKeyMap
Gets or sets whether Key Map (MS Office like accelerator keys map) is used for this specific control. Currently this option is implemented for the RadRibbonBar control only.
Declaration
public override bool EnableKeyMap { get; set; }
Property Value
|
System.Boolean
|
Overrides
EnableTabScrollingOnMouseWheel
Gets or sets a value indicating whether tab scrolling on mouse wheel is enabled.
Declaration
public bool EnableTabScrollingOnMouseWheel { get; set; }
Property Value
|
System.Boolean
|
ExitButton
Gets the exit menu button
Declaration
public RadMenuButtonItem ExitButton { get; }
Property Value
|
RadMenuButtonItem
|
ExpandButton
Represent the Ribbon Expand button
Declaration
public RadToggleButtonElement ExpandButton { get; set; }
Property Value
|
RadToggleButtonElement
|
Expanded
Gets or sets a value indicating whether the ribbon bar is expanded.
Declaration
public bool Expanded { get; set; }
Property Value
|
System.Boolean
|
ForeColor
This property is not relevant for this class.
Declaration
public override Color ForeColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
HelpButton
Represent the Ribbon Help button
Declaration
public RadImageButtonElement HelpButton { get; set; }
Property Value
|
RadImageButtonElement
|
HelpButtonElement
Gets the help button element of the ribbon bar.
Declaration
public override RadItem HelpButtonElement { get; }
Property Value
|
RadItem
A RadItem representing the help button element. |
Overrides
IconCaptionElement
Gets the icon caption element of the ribbon bar.
Declaration
public override ImagePrimitive IconCaptionElement { get; }
Property Value
|
ImagePrimitive
An ImagePrimitive representing the icon caption element. |
Overrides
LayoutMode
Gets or sets the layout mode of the ribbon bar, determining whether it uses default or simplified layout.
Declaration
[RadDescription("LayoutMode", typeof(RadRibbonBarElement))]
public RibbonLayout LayoutMode { get; set; }
Property Value
|
RibbonLayout
|
LocalizationSettings
Gets the localization settings associated with this control
Declaration
public RibbonBarLocalizationSettings LocalizationSettings { get; }
Property Value
|
RibbonBarLocalizationSettings
|
MaximizeButton
Gets or sets if the ribbon bar has maximize button in its caption
Declaration
public bool MaximizeButton { get; set; }
Property Value
|
System.Boolean
|
MaximizeButtonElement
Gets the maximize button element of the ribbon bar.
Declaration
public override RadItem MaximizeButtonElement { get; }
Property Value
|
RadItem
A RadItem representing the maximize button element. |
Overrides
MinimizeButton
Gets or sets if the ribbon bar has minimize button in its caption
Declaration
public bool MinimizeButton { get; set; }
Property Value
|
System.Boolean
|
MinimizeButtonElement
Gets the minimize button element of the ribbon bar.
Declaration
public override RadItem MinimizeButtonElement { get; }
Property Value
|
RadItem
A RadItem representing the minimize button element. |
Overrides
OptionsButton
Gets the options menu button
Declaration
public RadMenuButtonItem OptionsButton { get; }
Property Value
|
RadMenuButtonItem
|
QuickAccessToolBar
Gets the QuickAccessToolBar element
Declaration
public RadQuickAccessToolBar QuickAccessToolBar { get; }
Property Value
|
RadQuickAccessToolBar
|
QuickAccessToolbarBelowRibbon
Gets or sets a value indicating whether the Quick Access Toolbar is positioned below the ribbon.
Declaration
[RadDescription("QuickAccessToolbarBelowRibbon", typeof(RadRibbonBarElement))]
public bool QuickAccessToolbarBelowRibbon { get; set; }
Property Value
|
System.Boolean
|
QuickAccessToolBarHeight
Gets or sets the height of the Quick Access Toolbar.
Declaration
[RadDescription("QuickAccessMenuHeight", typeof(RadRibbonBarElement))]
public int QuickAccessToolBarHeight { get; set; }
Property Value
|
System.Int32
|
QuickAccessToolBarItems
Gets the collection of items in the Quick Access Toolbar.
Declaration
[RadEditItemsAction]
[RadDescription("QuickAccessMenuItems", typeof(RadRibbonBarElement))]
[RadNewItem("Type here", true, false)]
public virtual RadItemOwnerCollection QuickAccessToolBarItems { get; }
Property Value
|
RadItemOwnerCollection
|
RibbonBarElement
Gets the instance of RadRibbonBarElement wrapped by this control. RadRibbonBarElement is the main element in the hierarchy tree and encapsulates the actual functionality of RadRibbonBar.
Declaration
public RadRibbonBarElement RibbonBarElement { get; }
Property Value
|
RadRibbonBarElement
|
SelectedCommandTab
Gets the currently selected command tab in the ribbon bar.
Declaration
public RibbonTab SelectedCommandTab { get; }
Property Value
|
RibbonTab
|
ShowExpandButton
Get or sets value indicating whether RibbonBar Help button is visible or hidden.
Declaration
public bool ShowExpandButton { get; set; }
Property Value
|
System.Boolean
|
ShowHelpButton
Get or sets value indicating whether RibbonBar Help button is visible or hidden.
Declaration
public bool ShowHelpButton { get; set; }
Property Value
|
System.Boolean
|
ShowLayoutModeButton
Gets or sets a value indicating whether the layout mode button is visible in the ribbon bar.
Declaration
[RadDescription("ShowLayoutModeButton", typeof(RadRibbonBarElement))]
public virtual bool ShowLayoutModeButton { get; set; }
Property Value
|
System.Boolean
|
SimplifiedHeight
Gets or sets the height of the ribbon bar when in simplified layout mode.
Declaration
[RadDescription("SimplifiedHeight", typeof(RadRibbonBarElement))]
public int SimplifiedHeight { get; set; }
Property Value
|
System.Int32
|
SmallImageList
Gets or sets the small image list
Declaration
public override ImageList SmallImageList { get; set; }
Property Value
|
System.Windows.Forms.ImageList
|
Overrides
StartButtonImage
Gets or sets the image for the start button of the ribbon bar.
Declaration
[RadDescription("StartButtonImage", typeof(RadRibbonBarElement))]
public Image StartButtonImage { get; set; }
Property Value
|
System.Drawing.Image
|
StartMenuBottomStrip
Gets the collection of items in the bottom strip of the start menu.
Declaration
[RadDescription("StartMenuBottomStrip", typeof(RadRibbonBarElement))]
public RadItemOwnerCollection StartMenuBottomStrip { get; }
Property Value
|
RadItemOwnerCollection
|
StartMenuItems
Gets the collection of items in the start menu.
Declaration
[RadEditItemsAction]
[RadDescription("StartMenuItems", typeof(RadRibbonBarElement))]
public virtual RadItemOwnerCollection StartMenuItems { get; }
Property Value
|
RadItemOwnerCollection
|
StartMenuRightColumnItems
Gets the collection of items in the right column of the start menu.
Declaration
[RadEditItemsAction]
[RadDescription("StartMenuRightColumnItems", typeof(RadRibbonBarElement))]
public virtual RadItemOwnerCollection StartMenuRightColumnItems { get; }
Property Value
|
RadItemOwnerCollection
|
StartMenuWidth
Gets or sets the width of the start menu.
Declaration
[RadDescription("StartMenuWidth", typeof(RadRibbonBarElement))]
[RadDefaultValue("StartMenuWidth", typeof(RadRibbonBarElement))]
public int StartMenuWidth { get; set; }
Property Value
|
System.Int32
|
SystemButtonsElement
Gets the system buttons element of the ribbon bar.
Declaration
public override RadItem SystemButtonsElement { get; }
Property Value
|
RadItem
A RadItem representing the system buttons element. |
Overrides
Text
Gets or sets the text of the control
Declaration
public override string Text { get; set; }
Property Value
|
System.String
|
Overrides
TextCaptionElement
Gets the text caption element of the ribbon bar.
Declaration
public override RadElement TextCaptionElement { get; }
Property Value
|
RadElement
A RadElement representing the text caption element. |
Overrides
Methods
ControlDefinesThemeForElement(RadElement)
Determines whether the control defines the theme for the specified element.
Declaration
public override bool ControlDefinesThemeForElement(RadElement element)
Parameters
|
RadElement
element
The element to check theme definition for. |
Returns
|
System.Boolean
True if the control defines the theme for the element; otherwise, false. |
Overrides
CreateAccessibilityInstance()
Creates an accessibility instance for the ribbon bar control.
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
|
System.Windows.Forms.AccessibleObject
An System.Windows.Forms.AccessibleObject that provides accessibility information for the control. |
CreateBehavior()
Creates the input behavior for handling keyboard and mouse interactions.
Declaration
protected override ComponentInputBehavior CreateBehavior()
Returns
|
ComponentInputBehavior
A ComponentInputBehavior instance that handles input for the ribbon bar. |
Overrides
CreateChildItems(RadElement)
Creates the child items for the ribbon bar control.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
|
RadElement
parent
The parent element that will contain the child items. |
Overrides
CreateRibbonBarElement()
Creates a new RadRibbonBarElement.
Declaration
protected virtual RadRibbonBarElement CreateRibbonBarElement()
Returns
|
RadRibbonBarElement
The created ribbon bar element. |
Dispose(Boolean)
Releases the unmanaged resources used by the RadRibbonBar and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
|
System.Boolean
disposing
True to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
InitializeRootElement(RootRadElement)
Initializes the root element of the ribbon bar control.
Declaration
protected override void InitializeRootElement(RootRadElement rootElement)
Parameters
|
RootRadElement
rootElement
The root element to initialize. |
Overrides
OnCommandTabSelected(CommandTabEventArgs)
Raises the CommandTabSelected event.
Declaration
protected virtual void OnCommandTabSelected(CommandTabEventArgs args)
Parameters
|
CommandTabEventArgs
args
The event arguments containing information about the selected command tab. |
OnCommandTabSelecting(CommandTabSelectingEventArgs)
Raises the CommandTabSelecting event.
Declaration
protected virtual void OnCommandTabSelecting(CommandTabSelectingEventArgs args)
Parameters
|
CommandTabSelectingEventArgs
args
The event arguments containing information about the command tab being selected. |
OnKeyDown(KeyEventArgs)
Handles key down events for keyboard navigation and key mapping.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
|
System.Windows.Forms.KeyEventArgs
e
The key event arguments. |
Overrides
OnKeyTipItemActivating(RadItem, CancelEventArgs)
Handles the key tip item activation event.
Declaration
protected bool OnKeyTipItemActivating(RadItem item, CancelEventArgs eventArgs)
Parameters
|
RadItem
item
The item being activated. |
|
System.ComponentModel.CancelEventArgs
eventArgs
The event arguments containing cancellation information. |
Returns
|
System.Boolean
True if the activation was cancelled; otherwise, false. |
OnKeyTipShowing(RadItem, CancelEventArgs)
Raises the KeyTipShowing event when a key tip is about to be shown.
Declaration
protected virtual bool OnKeyTipShowing(RadItem currentKeyMapItem, CancelEventArgs eventArgs)
Parameters
|
RadItem
currentKeyMapItem
The current key map item. |
|
System.ComponentModel.CancelEventArgs
eventArgs
The event arguments containing cancellation information. |
Returns
|
System.Boolean
True if the key tip showing was cancelled; otherwise, false. |
OnLayoutModeChanged(EventArgs)
Raises the LayoutModeChanged event when the layout mode changes.
Declaration
protected virtual void OnLayoutModeChanged(EventArgs args)
Parameters
|
System.EventArgs
args
The event arguments. |
OnMouseWheel(MouseEventArgs)
Handles the mouse wheel event to enable tab scrolling when configured.
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
|
System.Windows.Forms.MouseEventArgs
e
The mouse event arguments containing wheel information. |
Overrides
OnPaint(PaintEventArgs)
Handles the paint event and renders key tips when the key map is active.
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
|
System.Windows.Forms.PaintEventArgs
e
The paint event arguments. |
Overrides
OnParentChanged(EventArgs)
Handles the parent changed event to update ribbon bar text and form association.
Declaration
protected override void OnParentChanged(EventArgs e)
Parameters
|
System.EventArgs
e
The event arguments. |
Overrides
OnRibbonBarExpandedStateChanged(EventArgs)
Raises the ExpandedStateChanged event when the ribbon bar's expanded state changes.
Declaration
protected virtual void OnRibbonBarExpandedStateChanged(EventArgs args)
Parameters
|
System.EventArgs
args
The event arguments. |
OnRightToLeftChanged(EventArgs)
Handles right-to-left layout changes and updates the ribbon bar accordingly.
Declaration
protected override void OnRightToLeftChanged(EventArgs e)
Parameters
|
System.EventArgs
e
The event arguments. |
Overrides
OnThemeChanged()
Handles theme changes and updates related elements accordingly.
Declaration
protected override void OnThemeChanged()
Overrides
PaintKeyMap(Graphics)
Paints the key map when keyboard navigation is active.
Declaration
protected virtual void PaintKeyMap(Graphics graphics)
Parameters
|
System.Drawing.Graphics
graphics
The graphics context to paint on. |
PaintKeyTip(Graphics, RadKeyTipShowingEventArgs, String)
Paints an individual key tip on the specified graphics context.
Declaration
protected virtual void PaintKeyTip(Graphics graphics, RadKeyTipShowingEventArgs args, string keyTip)
Parameters
|
System.Drawing.Graphics
graphics
The graphics context to paint on. |
|
RadKeyTipShowingEventArgs
args
The key tip showing event arguments containing appearance settings. |
|
System.String
keyTip
The key tip text to display. |
ProcessAutoSizeChanged(Boolean)
Processes auto-size changes for the ribbon bar control.
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
|
System.Boolean
value
The new auto-size value. |
Overrides
ProcessCmdKey(ref Message, Keys)
Processes command keys for keyboard navigation and arrow key handling.
Declaration
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
Parameters
|
System.Windows.Forms.Message
msg
The Windows message to process. |
|
System.Windows.Forms.Keys
keyData
The key data to process. |
Returns
|
System.Boolean
True if the command key was processed; otherwise, false. |
ProcessCodedUIMessage(ref IPCMessage)
Processes CodedUI messages for automation support.
Declaration
protected override void ProcessCodedUIMessage(ref IPCMessage request)
Parameters
|
IPCMessage
request
The IPC message request to process. |
Overrides
WmNCHitTest(ref Message)
Handles window non-client hit testing for form integration.
Declaration
protected override bool WmNCHitTest(ref Message msg)
Parameters
|
System.Windows.Forms.Message
msg
The Windows message to process. |
Returns
|
System.Boolean
True if the message was handled; otherwise, false. |
Overrides
Events
CommandTabSelected
Occurs when a command tab is selected.
Declaration
[RadDescription("CommandTabSelected", typeof(RadRibbonBarElement))]
public event CommandTabEventHandler CommandTabSelected
Event Type
|
CommandTabEventHandler
|
CommandTabSelecting
Occurs before a command tab is selected, allowing the operation to be cancelled.
Declaration
[RadDescription("CommandTabSelecting", typeof(RadRibbonBarElement))]
public event CommandTabSelectingEventHandler CommandTabSelecting
Event Type
|
CommandTabSelectingEventHandler
|
ExpandedStateChanged
Occurs when the expanded state of the ribbon bar changes.
Declaration
[RadDescription("ExpandedStateChanged", typeof(RadRibbonBarElement))]
public event EventHandler ExpandedStateChanged
Event Type
|
System.EventHandler
|
KeyTipActivating
Occurs when the user activates a key tip.
Declaration
public event CancelEventHandler KeyTipActivating
Event Type
|
System.ComponentModel.CancelEventHandler
|
KeyTipShowing
Occurs when the ribbon bar is about to show key tips.
Declaration
public event CancelEventHandler KeyTipShowing
Event Type
|
System.ComponentModel.CancelEventHandler
|
LayoutModeChanged
Occurs when the layout mode of the ribbon bar changes.
Declaration
[RadDescription("LayoutModeChanged", typeof(RadRibbonBarElement))]
public event EventHandler LayoutModeChanged
Event Type
|
System.EventHandler
|