Skip to main content
Version: 4.2

RichTextBoxToolbarButton

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

A button added to the toolbar of a RichTextBox by the application.

public class RichTextBoxToolbarButton : INotifyPropertyChanged

Add it to ToolbarButtons; a click raises ToolbarButtonClick with the edits made so far already on the server.

Example:

editor.ToolbarButtons.Add(new RichTextBoxToolbarButton("signature", "Images/sign.svg", "Insert signature"));
editor.ToolbarButtonClick += (s, e) => {
if (e.Button.Name == "signature") editor.SelectedHtml = "<p><b>" + userName + "</b></p>";
};

Constructors​

Instance member RichTextBoxToolbarButton()​

Creates a button without a name.

Instance member RichTextBoxToolbarButton(name, imageSource, toolTipText)​

Creates a button.

NameTypeDescription
nameStringThe name passed back by ToolbarButtonClick.
imageSourceStringThe icon: a theme icon name, a URL or a file of the application.
toolTipTextStringThe tooltip.

Properties​

Instance member Enabled​

Boolean: Gets or sets whether the button can be clicked; the whole toolbar is disabled while the editor is read-only. (Default: True)

Instance member ImageSource​

String: Gets or sets the icon: a theme icon name, a URL or a file of the application. (Default: "")

Instance member Name​

String: Gets or sets the name that identifies the button in ToolbarButtonClick. (Default: "")

Instance member Tag​

Object: Gets or sets an object with data about the button. (Default: null)

Instance member Text​

String: Gets or sets the caption; it is shown when there is no icon. (Default: "")

Instance member ToolTipText​

String: Gets or sets the tooltip. (Default: "")

Events​

Instance member PropertyChanged​

PropertyChangedEventHandler Occurs when a property changes, so that the toolbar is updated.