aspnet-devexpress-dot-web-dot-aspxhtmleditor-d9cc2a49.md
A default toolbar button that allows the background color to be specified for the text selected within the design view area.
Namespace : DevExpress.Web.ASPxHtmlEditor
Assembly : DevExpress.Web.ASPxHtmlEditor.v25.2.dll
NuGet Package : DevExpress.Web
public class ToolbarBackColorButton :
ToolbarColorButtonBase
Public Class ToolbarBackColorButton
Inherits ToolbarColorButtonBase
The ASPxHtmlEditor allows end-users to change the back color of the editor’s selected text by using the Back Color button ( ToolbarBackColorButton ). Clicking the Back Color button opens a drop down window with predefined colors.
You can fill the drop down window with custom colors using the ToolbarColorButtonBase.Items property.
If the button ToolbarColorButtonBase.EnableCustomColors property is set to true, end-users can select a custom color using the color picker.
You can add the Back Color button to toolbars by using either the ASPxHtmlEditor designer at design time, or programmatically.
protected void Page_Load(object sender, EventArgs e) {
HtmlEditorToolbar stToolbar1 = HtmlEditorToolbar.CreateStandardToolbar1();
ToolbarBackColorButton backColor = new ToolbarBackColorButton();
stToolbar1.Items.Add(backColor);
ASPxHtmlEditor1.Toolbars.Add(stToolbar1);
}
<dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server">
<Toolbars>
<dx:HtmlEditorToolbar Name="StandardToolbar1">
<Items>
<dx:ToolbarBackColorButton BeginGroup="True">
</dx:ToolbarBackColorButton>
</Items>
</dx:HtmlEditorToolbar>
</Toolbars>
</dx:ASPxHtmlEditor>
Object StateManager CollectionItem ToolbarItemBase HtmlEditorToolbarItem ToolbarDropDownBase ToolbarColorButtonBase ToolbarBackColorButton
See Also