RadToolBarItem
This partial class defines the rendering RadToolBarItem.
The RadToolBar control is made up of a list of toolbar items represented by RadToolBarItem objects (RadToolBarButton, RadToolBarDropDown, RadToolBarSplitButton). All toolbar items are stored in the Items collection of the toolbar. You can access the toolbar to which the item belongs by using the ToolBar property.
To create the toolbar items for a RadToolBar control, use one of the following methods:
- Use declarative syntax to create static toolbar items.
- Use a constructor to dynamically create new instances of either toolbar item classes (RadToolBarButton, RadToolBarDropDown, RadToolBarSplitButton). These RadToolBarItem objects can then be added to the Items collection of the RadToolBar.
- Bind the RadToolBar control to a data source.
Each toolbar item has a Text property. The Button items (RadToolBarButton and RadToolBarSplitButton) have a Value property. The value of the Text property is displayed in the RadToolBar control, while the Value property is used to store any additional data about the toolbar item.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
public abstract class RadToolBarItem : ControlItem, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IMarkableStateManager, IStateManager, INamingContainer, IXmlSerializable
Inheritance: objectControlWebControlControlItemRadToolBarItem
Derived Classes:
Implements:
Inherited Members
Constructors
protected RadToolBarItem()
Properties
Gets or sets the Cascading Style Sheet (CSS) class applied when the toolbar item is clicked.
public string ClickedCssClass { get; set; }
The CSS class applied when the toolbar item is clicked. The default value is String.Empty.
Gets or sets the path to an image to display for the item when the user clicks it.
public string ClickedImageUrl { get; set; }
The path to the image to display when the user clicks the item. The default value is empty string.
Use the ClickedImageUrl property to specify the image that will be used when the user clicks the item. If the ClickedImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.
Gets or sets the Cascading Style Sheet (CSS) class applied when the toolbar item is disabled.
public string DisabledCssClass { get; set; }
The CSS class applied when the toolbar item is disabled. The default value is String.Empty.
By default the visual appearance of disabled toolbar items is defined in the skin CSS file. You can use the DisabledCssClass property to specify unique appearance for the toolbar item when it is disabled.
Gets or sets the path to an image to display when the item is disabled.
public virtual string DisabledImageUrl { get; set; }
The path to the image to display when the item is disabled. The default value is empty string.
Use the DisabledImageUrl property to specify the image that will be used when the item is disabled. If the DisabledImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.
Gets or sets a value indicating whether the item image should have sprite support.
[ClientControlProperty]
[ClientPropertyName("enableImageSprite")]
public bool EnableImageSprite { get; set; }
True if the item should have sprite support; otherwise False. The default value is False.
Gets or sets the Cascading Style Sheet (CSS) class applied when the toolBar item is focused after tabbing to it, or by using its AccessKey
public string FocusedCssClass { get; set; }
The CSS class applied when the toolBar item is focused. The default value is String.Empty.
By default the visual appearance of focused toolBar items is defined in the skin CSS file. You can use the FocusedCssClass property to specify unique appearance for the toolBar item when it is focused.
Gets or sets the path to an image to display when the user focuses the item either by tabbing to it or by using the AccessKey
public virtual string FocusedImageUrl { get; set; }
The path to the image to display when the user user focuses the item either by tabbing to that it or by using the AccessKey. The default value is empty string.
Use the FocusedImageUrl property to specify the image that will be used when the item gets the focus after tabbing or using its AccessKey. If the FocusedImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.
Gets or sets the Cascading Style Sheet (CSS) class applied when the user moves the mouse over the toolbar item.
public string HoveredCssClass { get; set; }
The CSS class applied when the user moves the mouse over the toolbar item. The default value is String.Empty.
By default the visual appearance of a hovered toolbar items is defined in the skin CSS file. You can use the HoveredCssClass property to specify unique appearance for the toolbar item when it is hovered.
Gets or sets the path to an image to display when the user moves the mouse over the item.
public virtual string HoveredImageUrl { get; set; }
The path to the image to display when the user moves the mouse over the item. The default value is empty string.
Use the HoveredImageUrl property to specify the image that will be used when the user moves the mouse over the item. If the HoveredImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.
Gets or sets the ID.
[Browsable(false)]
public string ID { get; set; }
The ID.
Gets or sets the position of the item image according to the item text.
public ToolBarImagePosition ImagePosition { get; set; }
The position of the item image according to the item text. The default value is ToolBarImagePosition.Left.
Gets or sets the path to an image to display for the item.
public virtual string ImageUrl { get; set; }
The path to the image to display for the item. The default value is empty string.
Use the ImageUrl property to specify the image for the item. If the ImageUrl property is set to empty string no image will be rendered. Use "~" (tilde) when referring to images within the current ASP.NET application.
protected RadToolBarItem.RendererBase ItemRenderer { get; }
Gets or sets the Cascading Style Sheet (CSS) class applied on the outmost element (<LI>).
public string OuterCssClass { get; set; }
The CSS class applied on the wrapping element (<LI>). The default value is empty string.
You can use the OuterCssClass property to specify unique appearance for the item, or to insert elements that are before/after the link element.
Gets or Sets OverFlow state
[ClientControlProperty]
[ClientPropertyName("overFlow")]
public ToolBarOverflow OverFlow { get; set; }
Gets or Sets ShowImage state
[ClientControlProperty]
[ClientPropertyName("showImage")]
public virtual ToolBarShowPosition ShowImage { get; set; }
Gets or Sets ShowText state
[ClientControlProperty]
[ClientPropertyName("showText")]
public virtual ToolBarShowPosition ShowText { get; set; }
Gets or sets the Cascading Style Sheet (CSS) class that contains the sprite image for this item and the positioning for it.
public string SpriteCssClass { get; set; }
The CSS that is used in sprite image scenarios. String.Empty.
By default, the image in an item is defined by the ImageUrl property. You can use SpriteCssClass to specify a class that will position a sprite instead of using image.
protected override HtmlTextWriterTag TagKey { get; }
Overrides:
Gets or sets the text displayed for the current item.
public override string Text { get; set; }
The text an item in the RadToolBar control displays. The default is empty string.
Overrides:
Use the Text property to specify or determine the text an item displays displays in the RadToolBar control.
Gets the RadToolBar instance which contains the item.
[Browsable(false)]
public RadToolBar ToolBar { get; }
Use this property to obtain an instance to the RadToolBar object containing the item.
Methods
protected override void AddAttributesToRender(HtmlTextWriter writer)
Overrides:
protected abstract RadToolBarItem.RendererBase CreateRenderer()
protected override void LoadFromDictionary(IDictionary<string, object> dictionary)
Overrides:
protected override void RenderContents(HtmlTextWriter writer)
Overrides:
protected static void WriteXmlForChildren(XmlWriter writer, RadToolBarItemCollection children)