New to Telerik UI for WPF? Download free 30-day trial

Text Message

The TextMessage is intended to be used for sending a simple string type message. Its constructor accepts the following parameters.

  • String text
  • Author author
  • String status: when having a status defined, the creationDate needs to be set as well.
  • DateTime creationDate: the creationDate parameter can be set optionally.

Example 1: Defining a TextMessage

var textMessage = new TextMessage(this.currentAuthor, "Some text message", "sent", DateTime.Now); 
textMessage.InlineViewModel.StatusVisibility = Visibility.Visible; 
 
this.chat.AddMessage(textMessage); 

Figure 1: Defining TextMessage

TextMessage with Status set

See Also

In this article