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.
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
Initializes a new instance of the RadRibbonBar class.
public RadRibbonBar()
Fields
Command for expanding or collapsing the ribbon bar.
public static readonly ExpandCollapseCommand ExpandCollapseCommand
Properties
Gets or sets a value indicating the type of the fade animation.
public virtual FadeAnimationType ApplicationMenuAnimantionType { get; set; }
Gets or sets the application menu style for the ribbon bar.
[Browsable(true)]
public virtual ApplicationMenuStyle ApplicationMenuStyle { get; set; }
Gets or sets the backstage control for the ribbon bar.
[Browsable(false)]
public RadRibbonBarBackstageView BackstageControl { get; set; }
Gets or sets a flag indicating whether the control causes validation
[Browsable(false)]
public bool CausesValidation { get; set; }
Gets or sets if the ribbon bar has close button in its caption
public bool CloseButton { get; set; }
Gets or sets a value indicating whether the ribbon bar will be collapsed or expanded on ribbon tab double click.
[Browsable(false)]
public bool CollapseRibbonOnTabDoubleClick { get; set; }
Gets the collection of command tabs in the ribbon bar.
[Browsable(true)]
[RadEditItemsAction]
[RadNewItem("Add New Tab...", true, true, false)]
public virtual RadRibbonBarCommandTabCollection CommandTabs { get; }
Gets the collection of contextual tab groups in the ribbon bar.
[Browsable(true)]
[RadEditItemsAction]
[RadNewItem("Add Context...", true, true, false)]
public RadItemOwnerCollection ContextualTabGroups { get; }
Gets or sets the default size of the ribbon bar control.
protected override Size DefaultSize { get; }
A Size structure representing the default size.
Overrides:
Gets or sets which edge of the parent container a control is docked to.
public override DockStyle Dock { get; set; }
Overrides:
Allows the user to navigate the control using the keyboard
[Browsable(true)]
public bool EnableKeyboardNavigation { get; set; }
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.
[Browsable(true)]
public override bool EnableKeyMap { get; set; }
Overrides:
Gets or sets a value indicating whether tab scrolling on mouse wheel is enabled.
[Browsable(true)]
public bool EnableTabScrollingOnMouseWheel { get; set; }
Gets the exit menu button
[Browsable(true)]
public RadMenuButtonItem ExitButton { get; }
Represent the Ribbon Expand button
public RadToggleButtonElement ExpandButton { get; set; }
Gets or sets a value indicating whether the ribbon bar is expanded.
[Browsable(false)]
public bool Expanded { get; set; }
Represent the Ribbon Help button
public RadImageButtonElement HelpButton { get; set; }
Gets the help button element of the ribbon bar.
public override RadItem HelpButtonElement { get; }
A RadItem representing the help button element.
Overrides:
Gets the icon caption element of the ribbon bar.
public override ImagePrimitive IconCaptionElement { get; }
An ImagePrimitive representing the icon caption element.
Overrides:
Gets or sets the layout mode of the ribbon bar, determining whether it uses default or simplified layout.
[Browsable(false)]
public RibbonLayout LayoutMode { get; set; }
Gets the localization settings associated with this control
public RibbonBarLocalizationSettings LocalizationSettings { get; }
Gets or sets if the ribbon bar has maximize button in its caption
public bool MaximizeButton { get; set; }
Gets the maximize button element of the ribbon bar.
public override RadItem MaximizeButtonElement { get; }
A RadItem representing the maximize button element.
Overrides:
Gets or sets if the ribbon bar has minimize button in its caption
public bool MinimizeButton { get; set; }
Gets the minimize button element of the ribbon bar.
public override RadItem MinimizeButtonElement { get; }
A RadItem representing the minimize button element.
Overrides:
Gets the options menu button
[Browsable(true)]
public RadMenuButtonItem OptionsButton { get; }
Gets the QuickAccessToolBar element
[Browsable(true)]
public RadQuickAccessToolBar QuickAccessToolBar { get; }
Gets or sets a value indicating whether the Quick Access Toolbar is positioned below the ribbon.
[Browsable(true)]
public bool QuickAccessToolbarBelowRibbon { get; set; }
Gets or sets the height of the Quick Access Toolbar.
[Browsable(true)]
public int QuickAccessToolBarHeight { get; set; }
Gets the collection of items in the Quick Access Toolbar.
[Browsable(true)]
[RadEditItemsAction]
[RadNewItem("Type here", true, false)]
public virtual RadItemOwnerCollection QuickAccessToolBarItems { get; }
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.
[Browsable(false)]
public RadRibbonBarElement RibbonBarElement { get; }
Gets the currently selected command tab in the ribbon bar.
[Browsable(false)]
public RibbonTab SelectedCommandTab { get; }
Get or sets value indicating whether RibbonBar Help button is visible or hidden.
public bool ShowExpandButton { get; set; }
Get or sets value indicating whether RibbonBar Help button is visible or hidden.
public bool ShowHelpButton { get; set; }
Gets or sets a value indicating whether the layout mode button is visible in the ribbon bar.
[Browsable(true)]
public virtual bool ShowLayoutModeButton { get; set; }
Gets or sets the height of the ribbon bar when in simplified layout mode.
[Browsable(true)]
public int SimplifiedHeight { get; set; }
Gets or sets the small image list
[Browsable(true)]
public override ImageList SmallImageList { get; set; }
Overrides:
Gets or sets the image for the start button of the ribbon bar.
[Browsable(true)]
[TypeConverter(typeof(ImageTypeConverter))]
public Image StartButtonImage { get; set; }
Gets the collection of items in the bottom strip of the start menu.
[Browsable(false)]
public RadItemOwnerCollection StartMenuBottomStrip { get; }
Gets the collection of items in the start menu.
[Browsable(true)]
[RadEditItemsAction]
public virtual RadItemOwnerCollection StartMenuItems { get; }
Gets the collection of items in the right column of the start menu.
[Browsable(true)]
[RadEditItemsAction]
public virtual RadItemOwnerCollection StartMenuRightColumnItems { get; }
Gets or sets the width of the start menu.
[Browsable(true)]
public int StartMenuWidth { get; set; }
Gets the system buttons element of the ribbon bar.
public override RadItem SystemButtonsElement { get; }
A RadItem representing the system buttons element.
Overrides:
Gets or sets the text of the control
public override string Text { get; set; }
Overrides:
Gets the text caption element of the ribbon bar.
public override RadElement TextCaptionElement { get; }
A RadElement representing the text caption element.
Overrides:
Methods
Determines whether the control defines the theme for the specified element.
public override bool ControlDefinesThemeForElement(RadElement element)
The element to check theme definition for.
Returns:True if the control defines the theme for the element; otherwise, false.
Overrides:
Creates an accessibility instance for the ribbon bar control.
protected override AccessibleObject CreateAccessibilityInstance()
An AccessibleObject that provides accessibility information for the control.
Overrides:
Creates the input behavior for handling keyboard and mouse interactions.
protected override ComponentInputBehavior CreateBehavior()
A ComponentInputBehavior instance that handles input for the ribbon bar.
Overrides:
Creates the child items for the ribbon bar control.
protected override void CreateChildItems(RadElement parent)
The parent element that will contain the child items.
Overrides:
Creates a new RadRibbonBarElement.
protected virtual RadRibbonBarElement CreateRibbonBarElement()
The created ribbon bar element.
Releases the unmanaged resources used by the RadRibbonBar and optionally releases the managed resources.
protected override void Dispose(bool disposing)
True to release both managed and unmanaged resources; false to release only unmanaged resources.
Overrides:
Initializes the root element of the ribbon bar control.
protected override void InitializeRootElement(RootRadElement rootElement)
The root element to initialize.
Overrides:
Raises the CommandTabSelected event.
protected virtual void OnCommandTabSelected(CommandTabEventArgs args)
The event arguments containing information about the selected command tab.
Raises the CommandTabSelecting event.
protected virtual void OnCommandTabSelecting(CommandTabSelectingEventArgs args)
The event arguments containing information about the command tab being selected.
Handles key down events for keyboard navigation and key mapping.
protected override void OnKeyDown(KeyEventArgs e)
The key event arguments.
Overrides:
Handles the key tip item activation event.
protected bool OnKeyTipItemActivating(RadItem item, CancelEventArgs eventArgs)
The item being activated.
eventArgsCancelEventArgsThe event arguments containing cancellation information.
Returns:True if the activation was cancelled; otherwise, false.
Raises the KeyTipShowing event when a key tip is about to be shown.
protected virtual bool OnKeyTipShowing(RadItem currentKeyMapItem, CancelEventArgs eventArgs)
The current key map item.
eventArgsCancelEventArgsThe event arguments containing cancellation information.
Returns:True if the key tip showing was cancelled; otherwise, false.
Raises the LayoutModeChanged event when the layout mode changes.
protected virtual void OnLayoutModeChanged(EventArgs args)
The event arguments.
Handles the mouse wheel event to enable tab scrolling when configured.
protected override void OnMouseWheel(MouseEventArgs e)
The mouse event arguments containing wheel information.
Overrides:
Handles the paint event and renders key tips when the key map is active.
protected override void OnPaint(PaintEventArgs e)
The paint event arguments.
Overrides:
Handles the parent changed event to update ribbon bar text and form association.
protected override void OnParentChanged(EventArgs e)
The event arguments.
Overrides:
Raises the ExpandedStateChanged event when the ribbon bar's expanded state changes.
protected virtual void OnRibbonBarExpandedStateChanged(EventArgs args)
The event arguments.
Handles right-to-left layout changes and updates the ribbon bar accordingly.
protected override void OnRightToLeftChanged(EventArgs e)
The event arguments.
Overrides:
Handles theme changes and updates related elements accordingly.
protected override void OnThemeChanged()
Overrides:
Paints the key map when keyboard navigation is active.
protected virtual void PaintKeyMap(Graphics graphics)
The graphics context to paint on.
Paints an individual key tip on the specified graphics context.
protected virtual void PaintKeyTip(Graphics graphics, RadKeyTipShowingEventArgs args, string keyTip)
The graphics context to paint on.
argsRadKeyTipShowingEventArgsThe key tip showing event arguments containing appearance settings.
keyTipstringThe key tip text to display.
Processes auto-size changes for the ribbon bar control.
protected override void ProcessAutoSizeChanged(bool value)
The new auto-size value.
Overrides:
Processes command keys for keyboard navigation and arrow key handling.
Processes CodedUI messages for automation support.
protected override void ProcessCodedUIMessage(ref IPCMessage request)
The IPC message request to process.
Overrides:
Events
Occurs when a command tab is selected.
public event CommandTabEventHandler CommandTabSelected
Occurs before a command tab is selected, allowing the operation to be cancelled.
public event CommandTabSelectingEventHandler CommandTabSelecting
Occurs when the expanded state of the ribbon bar changes.
public event EventHandler ExpandedStateChanged
Occurs when the user activates a key tip.
public event CancelEventHandler KeyTipActivating
Occurs when the ribbon bar is about to show key tips.
public event CancelEventHandler KeyTipShowing
Occurs when the layout mode of the ribbon bar changes.
public event EventHandler LayoutModeChanged