New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

This Class defines RibbonBarMenuItem.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class RibbonBarMenuItem : WebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IRibbonBarSubComponent, IXmlSerializable

Inheritance: objectControlWebControlRibbonBarMenuItem

Implements: IAttributeAccessorIComponentIControlBuilderAccessorIControlDesignerAccessorIDataBindingsAccessorIDisposableIExpressionsAccessorIParserAccessorIRibbonBarSubComponentIUrlResolutionServiceIXmlSerializable...

Inherited Members WebControl.AddAttributesToRender(HtmlTextWriter)WebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.LoadViewState(object)WebControl.TrackViewState()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.RenderContents(HtmlTextWriter)WebControl.SaveViewState()WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.HeightWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagKeyWebControl.TagNameWebControl.WidthControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.OnInit(EventArgs)Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnLoad(EventArgs)Control.OnPreRender(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.CreateChildControls()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public RibbonBarMenuItem()

Fields

C#
protected const string NonBreakingSpace = " "

Properties

Gets or sets an optional parameter passed to the Command event along with the associated CommandName.

C#
[Bindable(true)]
public string CommandArgument { get; set; }

Gets or sets the command name associated with the MenuItem that is passed to the Command event.

C#
public string CommandName { get; set; }

Gets or sets the container.

C#
public IRibbonBarSubComponent Container { get; }
Property Value:

The container.

Gets or sets the image's URL of the item, used when it's disabled.

C#
public string DisabledImageUrl { get; set; }
Property Value:

The URL to the image. The default value is empty string.

Use the DisabledImageUrl property to specify a custom image that will be used when the item is disabled.

Gets or sets the rendered alt text of the item's image dom element.

C#
public string ImageAltText { get; set; }
Property Value:

alt text of an item's image. The default value is empty string.

Use the property to set the alt text for the item's image element, when needed for accessibility.

Gets or sets the image's URL of the item, used when it's enabled.

C#
public string ImageUrl { get; set; }
Property Value:

The URL to the image. The default value is empty string.

Use the ImageUrl property to specify a custom image that will be used when the item is enabled.

Gets a RibbonBarMenuItemCollection object that contains the sub-items of the MenuItem.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public RibbonBarMenuItemCollection Items { get; }
Property Value:

A RibbonBarMenuItemCollection that contains the sub-items of the MenuItem. By default the collection is empty (the MenuItem has no sub-items).

Use the Items property to access the sub-items of the MenuItem. You can also use the Items property to manage the items. You can add, remove or modify items from the Items collection.

Example:
cs-api-definition
menuItem.Items[0].Text = "SampleMenuItemText";

Gets or sets navigation URL for the item. Usually pointing to a page.

C#
public string NavigateUrl { get; set; }
Property Value:

URL. The default value is empty string.

Use the NavigateUrl property to specify a custom a url to a page which should be loaded on click on the item.

Gets the parent item of the menu item. Returns null if the parent is the menu itself.

C#
public RibbonBarMenuItem ParentItem { get; }

Gets or sets the parent web control.

C#
public WebControl ParentWebControl { get; }
Property Value:

The parent web control.

Implements: IRibbonBarSubComponent.ParentWebControl

Gets a reference to the RibbonBar instance.

C#
public RadRibbonBar RibbonBar { get; }
Property Value:

RadRibbonBar instance. If not set, the returned is null.

Implements: IRibbonBarSubComponent.RibbonBar

Use the property to get the RibbonBar instance.

Gets or sets the text of a certain item.

C#
public string Text { get; set; }
Property Value:

The text of an item. The default value is empty string.

Use the property to set the displayed text for an item.

Gets or sets the tooltip of a certain item.

C#
public override string ToolTip { get; set; }
Property Value:

The text displayed in the RibbonbBar's enhanced ToolTip. The default value is empty string.

Overrides: WebControl.ToolTip

When the ToolTip value is empty, the default ASP ToolTip is displayed with the Text of the item as a value. When ToolTip is set, the enhanced RibbonBar tooltip is shown instead of the default one.

Gets or sets the value property of the item.

C#
public string Value { get; set; }

You can use it to associate custom data with the item.

Example:
C#
This example illustrates how to use the <strong>Value</strong> property on <xref href="Telerik.Web.UI.RadRibbonBar.MenuItemClick?text=MenuItemClick" data-throw-if-not-resolved="false"></xref> event.

Methods

Searches the RibbonBarMenuItem for the first RibbonBarMenuItem which Value property is equal to the specified value.

C#
public RibbonBarMenuItem FindMenuItemByValue(string value)
Parameters:valuestring

The Value to search for.

Returns:

RibbonBarMenuItem

A RibbonBarMenuItem whose Value property is equal to the specifed value. If a button is not found, null (Nothing in Visual Basic) is returned.

Returns the Visible sub-items.

C#
public IList<RibbonBarMenuItem> GetVisibleItems()
Returns:

IList<RibbonBarMenuItem>

All visible sub-items.

Reads the XML.

C#
public void ReadXml(XmlReader reader)
Parameters:readerXmlReader

The reader.

C#
protected virtual void ReadXmlForMenuItems(XmlReader reader)
Parameters:readerXmlReader

Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.

C#
public override void RenderControl(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The object that receives the control content.

Overrides: Control.RenderControl(HtmlTextWriter)

C#
protected void RenderKeyboardBox(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter
C#
protected void WriteXml(XmlWriter writer)
Parameters:writerXmlWriter
C#
protected virtual void WriteXmlForMenuItems(XmlWriter writer)
Parameters:writerXmlWriter