asp.net.ph

Skip Navigation Links

Customizing the Toolbar Control User Interface

Controls You Can Use on Web Forms   ASP.NET IE WebControls   Toolbar WebControl


Even with the simplest declarative authoring, the Toolbar control renders with acceptable default styles.

Toolbar with Default Settings
Run Sample | View Source

The Toolbar, though, includes style and property attributes for fully customizing the appearance of the control in various ways, without the need for complex coding. Defining properties on the Toolbar element is all that is required.

Essentially, the Toolbar control derives from the base WebControl class and as such inherits all properties of that class. Some of these properties, such as BorderStyle, Height, and Width, apply to the control as a whole, while others, such as Font, apply to the child nodes of the Toolbar as well.

In addition, the child nodes of a Toolbar can be in any of three states: default, hover, or selected. The Toolbar has its own set of style properties which use CSS ( Cascading Style Sheets ) to specify styles for the different states.

State Description Toolbar Style Property
Default The default or normal state for all inactive ToolbarItem controls. DefaultStyle
Hover The state for a ToolbarItem control when the mouse is positioned over the item. HoverStyle
Selected The state for the selected or active ToolbarItem control. SelectedStyle

The below examples demonstrate the effect of setting styles for the various states of the child nodes in a Toolbar control.

Toolbar with Basic Style Settings
Run Sample | View Source
Using the MultiView with the ToolBar WebControl
Run Sample | View Source

For detailed information on setting specific style attributes, see this workshop’s reference on Cascading Style Sheets.

See Also

Introduction to the Toolbar Control   Adding Toolbar Controls to a Web Forms Page



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note