Skip to main content

MessageEventHandler

Namespace: Wisej.Web.Ext.ChatControl

Assembly: Wisej.Web.Ext.ChatControl (4.1.0.0)

Represents the method that will handle the SentMessage event, fired after a message has been added to the ChatBox.

public delegate void MessageEventHandler(Object sender, MessageEventArgs e)

Example:

chatBox.SentMessage += (object sender, MessageEventArgs e) =>
{
// reply to messages typed by the current user.
if (e.IsChatBoxUser)
chatBox.DataSource.Add(new Message("You said: " + e.Message.Content, null, new User("bot", "Echo")));
};

Parameters​

NameTypeDescription
senderObjectThe source of the event, the ChatBox.
eMessageEventArgsAn instance of MessageEventArgs with the message data.

Fired By​

NameDescription
ChatBox.SentMessageFired after a message has been sent and rendered in the ChatBox.