ClassRadRibbonBar
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.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Menus & Toolbars")]
public class RadRibbonBar : RadNonClientUIControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadNonClientUIControlRadRibbonBar
Derived Classes:
Implements:
Inherited Members
Constructors
RadRibbonBar()
Initializes a new instance of the RadRibbonBar class.
Declaration
public RadRibbonBar()
Fields
ExpandCollapseCommand
Command for expanding or collapsing the ribbon bar.
Declaration
public static readonly ExpandCollapseCommand ExpandCollapseCommand
Field Value
Properties
ApplicationMenuAnimantionType
Gets or sets a value indicating the type of the fade animation.
Declaration
public virtual FadeAnimationType ApplicationMenuAnimantionType { get; set; }
Property Value
ApplicationMenuStyle
Gets or sets the application menu style for the ribbon bar.
Declaration
[Browsable(true)]
public virtual ApplicationMenuStyle ApplicationMenuStyle { get; set; }
Property Value
BackstageControl
Gets or sets the backstage control for the ribbon bar.
Declaration
[Browsable(false)]
public RadRibbonBarBackstageView BackstageControl { get; set; }
Property Value
CausesValidation
Gets or sets a flag indicating whether the control causes validation
Declaration
[Browsable(false)]
public bool CausesValidation { get; set; }
Property Value
CloseButton
Gets or sets if the ribbon bar has close button in its caption
CollapseRibbonOnTabDoubleClick
Gets or sets a value indicating whether the ribbon bar will be collapsed or expanded on ribbon tab double click.
Declaration
[Browsable(false)]
public bool CollapseRibbonOnTabDoubleClick { get; set; }
Property Value
CommandTabs
Gets the collection of command tabs in the ribbon bar.
Declaration
[Browsable(true)]
[RadEditItemsAction]
[RadNewItem("Add New Tab...", true, true, false)]
public virtual RadRibbonBarCommandTabCollection CommandTabs { get; }
Property Value
ContextualTabGroups
Gets the collection of contextual tab groups in the ribbon bar.
Declaration
[Browsable(true)]
[RadEditItemsAction]
[RadNewItem("Add Context...", true, true, false)]
public RadItemOwnerCollection ContextualTabGroups { get; }
Property Value
DefaultSize
Gets or sets the default size of the ribbon bar control.
Dock
Gets or sets which edge of the parent container a control is docked to.
Declaration
public override DockStyle Dock { get; set; }
Property Value
Overrides
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
[Browsable(true)]
public override bool EnableKeyMap { get; set; }
Property Value
Overrides
EnableKeyboardNavigation
Allows the user to navigate the control using the keyboard
Declaration
[Browsable(true)]
public bool EnableKeyboardNavigation { get; set; }
Property Value
EnableTabScrollingOnMouseWheel
Gets or sets a value indicating whether tab scrolling on mouse wheel is enabled.
Declaration
[Browsable(true)]
public bool EnableTabScrollingOnMouseWheel { get; set; }
Property Value
ExitButton
Gets the exit menu button
Declaration
[Browsable(true)]
public RadMenuButtonItem ExitButton { get; }
Property Value
ExpandButton
Represent the Ribbon Expand button
Declaration
public RadToggleButtonElement ExpandButton { get; set; }
Property Value
Expanded
Gets or sets a value indicating whether the ribbon bar is expanded.
Declaration
[Browsable(false)]
public bool Expanded { get; set; }
Property Value
HelpButton
Represent the Ribbon Help button
Declaration
public RadImageButtonElement HelpButton { get; set; }
Property Value
HelpButtonElement
Gets the help button element of the ribbon bar.
IconCaptionElement
Gets the icon caption element of the ribbon bar.
Declaration
public override ImagePrimitive IconCaptionElement { get; }
Property Value
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
[Browsable(false)]
public RibbonLayout LayoutMode { get; set; }
Property Value
LocalizationSettings
Gets the localization settings associated with this control
Declaration
public RibbonBarLocalizationSettings LocalizationSettings { get; }
Property Value
MaximizeButton
Gets or sets if the ribbon bar has maximize button in its caption
MaximizeButtonElement
Gets the maximize button element of the ribbon bar.
MinimizeButton
Gets or sets if the ribbon bar has minimize button in its caption
MinimizeButtonElement
Gets the minimize button element of the ribbon bar.
OptionsButton
Gets the options menu button
Declaration
[Browsable(true)]
public RadMenuButtonItem OptionsButton { get; }
Property Value
QuickAccessToolBar
Gets the QuickAccessToolBar element
Declaration
[Browsable(true)]
public RadQuickAccessToolBar QuickAccessToolBar { get; }
Property Value
QuickAccessToolBarHeight
Gets or sets the height of the Quick Access Toolbar.
Declaration
[Browsable(true)]
public int QuickAccessToolBarHeight { get; set; }
Property Value
QuickAccessToolBarItems
Gets the collection of items in the Quick Access Toolbar.
Declaration
[Browsable(true)]
[RadEditItemsAction]
[RadNewItem("Type here", true, false)]
public virtual RadItemOwnerCollection QuickAccessToolBarItems { get; }
Property Value
QuickAccessToolbarBelowRibbon
Gets or sets a value indicating whether the Quick Access Toolbar is positioned below the ribbon.
Declaration
[Browsable(true)]
public bool QuickAccessToolbarBelowRibbon { get; set; }
Property Value
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
[Browsable(false)]
public RadRibbonBarElement RibbonBarElement { get; }
Property Value
SelectedCommandTab
Gets the currently selected command tab in the ribbon bar.
Declaration
[Browsable(false)]
public RibbonTab SelectedCommandTab { get; }
Property Value
ShowExpandButton
Get or sets value indicating whether RibbonBar Help button is visible or hidden.
ShowHelpButton
Get or sets value indicating whether RibbonBar Help button is visible or hidden.
ShowLayoutModeButton
Gets or sets a value indicating whether the layout mode button is visible in the ribbon bar.
Declaration
[Browsable(true)]
public virtual bool ShowLayoutModeButton { get; set; }
Property Value
SimplifiedHeight
Gets or sets the height of the ribbon bar when in simplified layout mode.
Declaration
[Browsable(true)]
public int SimplifiedHeight { get; set; }
Property Value
SmallImageList
Gets or sets the small image list
Declaration
[Browsable(true)]
public override ImageList SmallImageList { get; set; }
Property Value
Overrides
StartButtonImage
Gets or sets the image for the start button of the ribbon bar.
Declaration
[Browsable(true)]
[TypeConverter(typeof(ImageTypeConverter))]
public Image StartButtonImage { get; set; }
Property Value
StartMenuBottomStrip
Gets the collection of items in the bottom strip of the start menu.
Declaration
[Browsable(false)]
public RadItemOwnerCollection StartMenuBottomStrip { get; }
Property Value
StartMenuItems
Gets the collection of items in the start menu.
Declaration
[Browsable(true)]
[RadEditItemsAction]
public virtual RadItemOwnerCollection StartMenuItems { get; }
Property Value
StartMenuRightColumnItems
Gets the collection of items in the right column of the start menu.
Declaration
[Browsable(true)]
[RadEditItemsAction]
public virtual RadItemOwnerCollection StartMenuRightColumnItems { get; }
Property Value
StartMenuWidth
Gets or sets the width of the start menu.
Declaration
[Browsable(true)]
public int StartMenuWidth { get; set; }
Property Value
SystemButtonsElement
Gets the system buttons element of the ribbon bar.
Text
Gets or sets the text of the control
Declaration
public override string Text { get; set; }
Property Value
Overrides
TextCaptionElement
Gets the text caption element of the ribbon bar.
Declaration
public override RadElement TextCaptionElement { get; }
Property Value
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
element
The element to check theme definition for.
Returns
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
An AccessibleObject that provides accessibility information for the control.
Overrides
CreateBehavior()
Creates the input behavior for handling keyboard and mouse interactions.
Declaration
protected override ComponentInputBehavior CreateBehavior()
Returns
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
parent
The parent element that will contain the child items.
Overrides
CreateRibbonBarElement()
Creates a new RadRibbonBarElement.
Declaration
protected virtual RadRibbonBarElement CreateRibbonBarElement()
Returns
The created ribbon bar element.
Dispose(bool)
Releases the unmanaged resources used by the RadRibbonBar and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
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
rootElement
The root element to initialize.
Overrides
OnCommandTabSelected(CommandTabEventArgs)
Raises the CommandTabSelected event.
Declaration
protected virtual void OnCommandTabSelected(CommandTabEventArgs args)
Parameters
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
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
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
item
The item being activated.
eventArgs
The event arguments containing cancellation information.
Returns
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
currentKeyMapItem
The current key map item.
eventArgs
The event arguments containing cancellation information.
Returns
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
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
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
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
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
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
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
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
graphics
The graphics context to paint on.
args
The key tip showing event arguments containing appearance settings.
keyTip
The key tip text to display.
ProcessAutoSizeChanged(bool)
Processes auto-size changes for the ribbon bar control.
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
value
The new auto-size value.
Overrides
ProcessCmdKey(ref Message, Keys)
Processes command keys for keyboard navigation and arrow key handling.
ProcessCodedUIMessage(ref IPCMessage)
Processes CodedUI messages for automation support.
Declaration
protected override void ProcessCodedUIMessage(ref IPCMessage request)
Parameters
request
IPCMessage
The IPC message request to process.
Overrides
WmNCHitTest(ref Message)
Handles window non-client hit testing for form integration.
Events
CommandTabSelected
Occurs when a command tab is selected.
Declaration
public event CommandTabEventHandler CommandTabSelected
Event Value
CommandTabSelecting
Occurs before a command tab is selected, allowing the operation to be cancelled.
Declaration
public event CommandTabSelectingEventHandler CommandTabSelecting
Event Value
ExpandedStateChanged
Occurs when the expanded state of the ribbon bar changes.
Declaration
public event EventHandler ExpandedStateChanged
Event Value
KeyTipActivating
Occurs when the user activates a key tip.
Declaration
public event CancelEventHandler KeyTipActivating
Event Value
KeyTipShowing
Occurs when the ribbon bar is about to show key tips.
Declaration
public event CancelEventHandler KeyTipShowing
Event Value
LayoutModeChanged
Occurs when the layout mode of the ribbon bar changes.