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.
- C#
- VB.NET
public delegate void MessageEventHandler(Object sender, MessageEventArgs e)
Public Delegate Sub MessageEventHandler(ByVal sender As [Object], ByVal e As MessageEventArgs)
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
| Name | Type | Description |
|---|---|---|
| sender | Object | The source of the event, the ChatBox. |
| e | MessageEventArgs | An instance of MessageEventArgs with the message data. |
Fired By
| Name | Description |
|---|---|
| ChatBox.SentMessage | Fired after a message has been sent and rendered in the ChatBox. |