RadRibbonBarElement
Represents a ribbon bar element. The RadRibbonBarElement can be nested in other telerik controls. Essentially RadRibbonBar class is a simple wrapper for RadRibbonBarElement class. RadRibbonBar acts to transfer events to and from the its corresponding instance of the RadRibbonBarElement.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[ComVisible(false)]
public class RadRibbonBarElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadRibbonBarElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadRibbonBarElement class.
public RadRibbonBarElement()
Fields
public static RadProperty IsBackstageModeProperty
public static RadProperty IsRibbonFormActiveProperty
public static RadProperty QuickAccessMenuHeightProperty
public static RadProperty QuickAccessToolbarBelowRibbonProperty
public static RadProperty RibbonFormWindowStateProperty
public static RadProperty SimplifiedHeightProperty
Properties
Gets the application menu button element.
[Browsable(false)]
public RadApplicationMenuButtonElement ApplicationButtonElement { get; }
Gets or sets the width of the right column in the application menu.
public int ApplicationMenuRightColumnWidth { get; set; }
Gets or sets the application menu style for the ribbon bar.
public ApplicationMenuStyle ApplicationMenuStyle { get; set; }
Gets or sets the backstage control used for the backstage view.
public RadRibbonBarBackstageView BackstageControl { get; set; }
Gets the stack layout element that contains the buttons in the ribbon bar caption.
public StackLayoutElement ButtonsContainer { get; }
Gets the BorderPrimitive instance that represents the border of the ribbon's caption.
[Browsable(false)]
public BorderPrimitive CaptionBorder { get; }
Gets the FillPrimitive instance that represents the fill of the ribbon's caption.
[Browsable(false)]
public FillPrimitive CaptionFill { get; }
Gets or sets a value indicating whether the close button is visible in the ribbon 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.
public bool CollapseRibbonOnTabDoubleClick { get; set; }
Gets or sets a boolean value determining whether the groups are collapsed according to the ribbon's size.
public bool CollapsingEnabled { get; set; }
Gets a collection of the command tabs.
[Browsable(true)]
[RadEditItemsAction]
public RadRibbonBarCommandTabCollection CommandTabs { get; }
Gets a collection of contextual tab groups.
[Browsable(true)]
[RadNewItem("Add New Group...", true, true, false)]
public RadItemOwnerCollection ContextualTabGroups { get; }
Gets the exit menu button
[Browsable(false)]
public RadMenuButtonItem ExitButton { get; }
Gets or sets the ribbon expand/collapse button element.
public RadToggleButtonElement ExpandButton { get; set; }
Gets or sets a value indicating whether the RadRibbonBarElement is expanded or collapsed.
public bool Expanded { get; set; }
Gets or sets the ribbon help button element.
public RadImageButtonElement HelpButton { get; set; }
Gets the icon primitive element used to display the application icon.
public ImagePrimitive IconPrimitive { get; }
Gets or sets the ribbon layout.
[Browsable(true)]
public RibbonLayout LayoutMode { get; set; }
Gets or sets the ribbon layout mode button element.
public RadToggleSwitchElement LayoutModeButton { get; set; }
Gets or sets the ribbon layout mode text element.
public LightVisualElement LayoutModeTextElement { get; set; }
Gets or sets the localization settings for this ribbon bar element.
public RibbonBarLocalizationSettings LocalizationSettings { get; }
Gets or sets a value indicating whether the maximize button is visible in the ribbon caption.
public bool MaximizeButton { get; set; }
Gets or sets the MDI controls item for handling MDI window operations.
public RadMDIControlsItem MDIbutton { get; }
Gets or sets a value indicating whether the minimize button is visible in the ribbon caption.
public bool MinimizeButton { get; set; }
Gets the options menu button
[Browsable(false)]
public RadMenuButtonItem OptionsButton { get; }
Gets an instance of the RibbonBarPopup class which represents the ribbon bar popup.
[Browsable(false)]
public RibbonBarPopup Popup { get; }
Gets or sets the height of the quick access.
[Browsable(true)]
public int QuickAccessMenuHeight { get; set; }
Gets the collection of quick access toolbar items.
[Browsable(true)]
public RadItemOwnerCollection QuickAccessMenuItems { get; }
Gets the Quick Access Toolbar element.
[Browsable(false)]
public RadQuickAccessToolBar QuickAccessToolBar { get; }
Gets or sets if the quick access toolbar is below the ribbon.
[Browsable(true)]
public bool QuickAccessToolbarBelowRibbon { get; set; }
RibbonCaption
RadRibbonBarCaption
Gets or sets the ribbon caption element.
public RadRibbonBarCaption RibbonCaption { get; set; }
Gets the instance of the currently selected command tab.
[Browsable(false)]
public RibbonTab SelectedCommandTab { get; }
Gets or sets a value indicating whether the expand button is visible or hidden.
public bool ShowExpandButton { get; set; }
Gets a value indicating whether the help button is visible or hidden.
public bool ShowHelpButton { get; set; }
Gets or sets whether the toggle switch enabling the Simplified ribbon style is visible.
[Browsable(true)]
public bool ShowLayoutModeButton { get; set; }
Gets or sets the height of the simplified ribbon.
[Browsable(true)]
public int SimplifiedHeight { get; set; }
Gets or sets the image of the start button placed in the top left corner.
[TypeConverter(typeof(ImageTypeConverter))]
[Browsable(true)]
public Image StartButtonImage { get; set; }
Gets the collection of start button menu items which appear at the bottom when the button has two columns.
[Browsable(true)]
public RadItemOwnerCollection StartMenuBottomStrip { get; }
Gets the collection of start button menu items.
[Browsable(true)]
public RadItemOwnerCollection StartMenuItems { get; }
Gets the collection of start button menu items which appear on the right column.
[Browsable(true)]
public RadItemOwnerCollection StartMenuRightColumnItems { get; }
Gets or sets the width of the start menu
[Browsable(true)]
public int StartMenuWidth { get; set; }
Gets an instance of the RibbonTabStripElement which displays the tab items in the ribbon bar.
[Browsable(false)]
public RibbonTabStripElement TabStripElement { get; }
Methods
Changes the base fill style for the tab based on the contextual group.
protected virtual void ChangeTabBaseFillStyle(ContextualTabGroup group, LightVisualElement contentArea, LightVisualElement tabFill)
The contextual tab group.
contentAreaLightVisualElementThe content area element.
tabFillLightVisualElementThe tab fill element.
Creates the child elements of the ribbon bar.
protected override void CreateChildElements()
Overrides:
Creates a new RibbonBarPopup instance.
protected virtual RibbonBarPopup CreateRibbonPopup()
The created popup instance.
Releases managed resources used by the element.
protected override void DisposeManagedResources()
Overrides:
Performs the core expand/collapse logic for the ribbon bar.
protected virtual void DoExpandCollapse()
Handles DPI scale changes for the ribbon bar element.
public override void DpiScaleChanged(SizeF scaleFactor)
The new scale factor.
Overrides:
Gets the maximum margin from ribbon groups in the specified holder.
protected virtual float GetMaximumRibbonGroupMargin(ExpandableStackLayout groupsHolder)
The expandable stack layout containing the groups.
Returns:The maximum margin value.
Gets the maximum height of tab content across all command tabs.
protected virtual float GetMaximumTabContentHeight()
The maximum tab content height.
Gets the maximum height of the tab strip including content.
Initializes the fields used by the ribbon bar element.
protected override void InitializeFields()
Overrides:
Raises the ApplicationMenuStyleChanged event.
Handles bubble events from child elements.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
The element that raised the event.
argsRoutedEventArgsThe routed event arguments.
Overrides:
Raises the CommandTabCollapsed event.
protected virtual void OnCommandTabCollapsed(CommandTabEventArgs args)
A CommandTabEventArgs that contains the event data.
Raises the CommandTabExpanded event.
protected virtual void OnCommandTabExpanded(CommandTabEventArgs args)
A CommandTabEventArgs that contains the event data.
Raises the CommandTabSelected event.
protected virtual void OnCommandTabSelected(CommandTabEventArgs args)
A CommandTabEventArgs that contains the event data.
Raises the CommandTabSelecting event.
protected virtual void OnCommandTabSelecting(CommandTabSelectingEventArgs args)
A CommandTabSelectingEventArgs that contains the event data.
Raises the ItemStyleChanged event.
protected virtual void OnItemStyleChanged(object sender, ItemStyleChangedEventArgs args)
The group where the item is located.
argsItemStyleChangedEventArgsAn ItemStyleChangedEventArgs that contains the event data.
Raises the ItemStyleChanging event.
protected virtual void OnItemStyleChanging(object sender, ItemStyleChangingEventArgs args)
The group where the item is located.
argsItemStyleChangingEventArgsAn ItemStyleChangingEventArgs that contains the event data.
Raises the ItemVisiblityStateChanging event.
protected virtual void OnItemVisiblityStateChanging(object sender, ItemVisiblityStateChangingEventArgs args)
The item which is about to be changed.
argsItemVisiblityStateChangingEventArgsAn ItemVisiblityStateChangingEventArgs that contains the event data.
Raises the LayoutModeChanged event.
Called when the element is loaded into the element tree.
protected override void OnLoaded()
Overrides:
Handles property changes for the ribbon bar element.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property changed event arguments.
Overrides:
Raises the ExpandedStateChanged event.
Called when the show ribbon layout button property changes.
protected virtual void OnShowRibbonLayoutButtonChanged()
Called when the simplified ribbon height property changes.
protected virtual void OnSimplifiedRibbonHeightChanged()
Paints the ribbon bar element.
protected override void PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, float angle, SizeF scale, bool useRelativeTransformation)
The graphics object used for painting.
clipRectangleRectangleThe clipping rectangle.
anglefloatThe rotation angle.
scaleSizeFThe scale factor.
useRelativeTransformationboolWhether to use relative transformation.
Overrides:
Performs the core logic for expanding or collapsing the ribbon bar.
protected virtual void PerformExpandedCore()
Shows a popup for the specified page view item.
public void ShowPopup(RadPageViewItem item)
The page view item to show popup for.
Updates references when the element tree changes.
protected override void UpdateReferences(ComponentThemableElementTree tree, bool updateInheritance, bool recursive)
The new component tree.
updateInheritanceboolWhether to update inheritance.
recursiveboolWhether to update recursively.
Overrides:
Events
Occurs when the application menu style is changed.
public event EventHandler ApplicationMenuStyleChanged
Occurs when a command tab is collapsed by double clicking an expanded command tab item.
public event CommandTabEventHandler CommandTabCollapsed
Occurs when a command tab is expanded by double clicking a collapsed command tab item.
public event CommandTabEventHandler CommandTabExpanded
Occurs when a command tab is selected.
public event CommandTabEventHandler CommandTabSelected
Occurs just before a command tab is selected.
public event CommandTabSelectingEventHandler CommandTabSelecting
Occurs when the ribbon bar is either expanded or collapsed.
public event EventHandler ExpandedStateChanged
Occurs after a RadProperty has changed after changing the layout mode.
public event ItemStyleChangedEventHandler ItemStyleChanged
Occurs when a RadProperty is about to be changed after changing the layout mode.
public event ItemStyleChangingEventHandler ItemStyleChanging
Occurs when an item's visibility state is about to be changed while resizing the ribbon bar.
public event ItemVisiblityStateChangingEventHandler ItemVisiblityStateChanging
Occurs when the layout mode is changed between Default and Simplified.
public event EventHandler LayoutModeChanged