List Message
Specific for the ListMessage
is that it has to be populated with a source collection and can have its SelectionMode
set. It exposes the following properties:
-
DisplayPosition
—This property is of the type of theMessageDisplayPosition
and allows you to specify the position of the message. -
Author
—The author of the message. -
Source
—Property of the type ofIEnumerable
, which is used to display entries in the list message. -
SelectionMode
—This property controls the selection mode of the displayed entries. It is of the type ofListViewSelectionMode
. -
CreationDate
—This property holds a DateTime object of the message's creation date.
Defining a ListMessage
List<string> coffeeTypes = new List<string>
{
"Caffe Latte",
"Cafe mocha",
"Frappuccino",
"Cuban espresso",
"Iced Coffee",
"Americano"
};
ListMessage listMessage = new ListMessage(MessageDisplayPosition.Inline, this.currentAuthor, coffeeTypes, ListViewSelectionMode.Multiple, DateTime.Now);
this.chat.AddMessage(listMessage);