Changing the Color of Toolbar Items
You can change the color of C1WebEditor's toolbar items using the ToolbarItemStyle.BackColor property. C1WebEditor offers three methods of setting this property, all of which are described below.
Setting the Color of the Toolbar Items Using the Designer
To set the color of the toolbar items using the smart tag, complete the following tasks:
1. Select
C1WebEditor's smart tag () to open the C1WebEditor Tasks menu.
2. From the C1WebEditor Tasks menu, select Property builder.
The C1WebEditor Properties editor appears.
3. Select the Styles tab.
4. Under Styles, expand ToolBar to reveal its list of properties.
5. Expand the Items node and then select Normal.
6. Under Properties, click the drop-down arrow next to BackColor, select the Web tab, choose a color from the list. For this example, we will set the property to Cornsilk.
Click OK to close the editor. Observe that the color of the toolbar items has changed to cornsilk.7.
Setting the Color of Toolbar Items in Source View
To set the color of the toolbar items in Source view, place the following markup between the </C1WebEditor:C1WebEditor> tags:
<ToolBarItemStyle BackColor="Cornsilk">
</ToolBarItemStyle>
Setting the Color of the Toolbar Items Programmatically
If you prefer to work programmatically, you can change the color of the toolbar items by adding code to the Page_Load event. The following code sets the toolbar items background color to CornSilk:
C1WebEditor1.ToolBarItemStyle.BackColor = System.Drawing.Color.CornSilk
• C#
C1WebEditor1.ToolBarItemStyle.BackColor = System.Drawing.Color.CornSilk;
This
Topic Illustrates the Following:
The color of your toolbar items is now set as you specified. In addition, you have learned how to how to set the ToolbarItemStyle.BackColor property using the designer, Source view, and C# and Visual Basic code.
Your final product will resemble the following image:
The image below shows a comparison between the default and cornsilk background colors.
|