ChatMessage ChatMessage ChatMessage ChatMessage Class

Definition

Represents a chat message.

public : sealed class ChatMessage : IChatItem, IChatMessage, IChatMessage2, IChatMessage3, IChatMessage4public sealed class ChatMessage : IChatItem, IChatMessage, IChatMessage2, IChatMessage3, IChatMessage4Public NotInheritable Class ChatMessage Implements IChatItem, IChatMessage, IChatMessage2, IChatMessage3, IChatMessage4// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

ChatMessage() ChatMessage() ChatMessage() ChatMessage()

Creates a new instance of the ChatMessage class.

public : ChatMessage()public ChatMessage()Public Sub New()// You can use this method in JavaScript.

Properties

Attachments Attachments Attachments Attachments

Gets a list of chat message attachments.

public : IVector<ChatMessageAttachment> Attachments { get; }public IList<ChatMessageAttachment> Attachments { get; }Public ReadOnly Property Attachments As IList<ChatMessageAttachment>// You can use this property in JavaScript.
Value
IVector<ChatMessageAttachment> IList<ChatMessageAttachment> IList<ChatMessageAttachment> IList<ChatMessageAttachment>

A list of chat message attachments.

Body Body Body Body

Gets or sets the body of the chat message.

public : PlatForm::String Body { get; set; }public string Body { get; set; }Public ReadWrite Property Body As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The body of the chat message.

Remarks

When an application invokes the compose task, the Body property can contain an initialized string value to appear when the compose task is launched.

If a message has more than one recipient and group text is enabled, the default case, the message is sent as an MMS message. In this situation, the message text is included as the first attachment and not in the Body. For a message with a single recipient, the Body is used for an SMS message and Subject property is valid for an MMS message.

EstimatedDownloadSize EstimatedDownloadSize EstimatedDownloadSize EstimatedDownloadSize

Gets or sets the estimated size of a file to be sent or received.

public : ulong EstimatedDownloadSize { get; set; }public ulong EstimatedDownloadSize { get; set; }Public ReadWrite Property EstimatedDownloadSize As ulong// You can use this property in JavaScript.
Value
ulong ulong ulong ulong

The estimated size of a file to be sent or received.

From From From From

Gets the identifier or address of the sender of the message.

public : PlatForm::String From { get; set; }public string From { get; set; }Public ReadWrite Property From As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The sender of the message.

Id Id Id Id

Gets the identifier of the message.

public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The ID of the chat message.

IsAutoReply IsAutoReply IsAutoReply IsAutoReply

Gets or sets a Boolean value indicating if the message is an auto-reply.

public : PlatForm::Boolean IsAutoReply { get; set; }public bool IsAutoReply { get; set; }Public ReadWrite Property IsAutoReply As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if the message is an auto-reply.

IsForwardingDisabled IsForwardingDisabled IsForwardingDisabled IsForwardingDisabled

Gets a Boolean value indicating if forwarding is disabled.

public : PlatForm::Boolean IsForwardingDisabled { get; set; }public bool IsForwardingDisabled { get; set; }Public ReadWrite Property IsForwardingDisabled As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if forwarding is disabled.

IsIncoming IsIncoming IsIncoming IsIncoming

Gets Boolean a value indicating if the message is incoming or outgoing.

public : PlatForm::Boolean IsIncoming { get; set; }public bool IsIncoming { get; set; }Public ReadWrite Property IsIncoming As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if the message is incoming or outgoing. TRUE indicates incoming, FALSE indicates outgoing.

IsRead IsRead IsRead IsRead

Gets a Boolean value indicating if the message has been read.

public : PlatForm::Boolean IsRead { get; set; }public bool IsRead { get; set; }Public ReadWrite Property IsRead As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if the message has been read.

IsReceivedDuringQuietHours IsReceivedDuringQuietHours IsReceivedDuringQuietHours IsReceivedDuringQuietHours

Gets or sets a Boolean value indicating if the message was received during user specified quiet hours.

public : PlatForm::Boolean IsReceivedDuringQuietHours { get; set; }public bool IsReceivedDuringQuietHours { get; set; }Public ReadWrite Property IsReceivedDuringQuietHours As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if the message was received during user specified quiet hours.

IsReplyDisabled IsReplyDisabled IsReplyDisabled IsReplyDisabled

Gets a Boolean value indicating if reply is disabled on the ChatMessage.

public : PlatForm::Boolean IsReplyDisabled { get; }public bool IsReplyDisabled { get; }Public ReadOnly Property IsReplyDisabled As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if reply is disabled on the ChatMessage.

IsSeen IsSeen IsSeen IsSeen

Gets or sets a Boolean value indicating if the message has been seen.

public : PlatForm::Boolean IsSeen { get; set; }public bool IsSeen { get; set; }Public ReadWrite Property IsSeen As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if the message has been seen.

IsSimMessage IsSimMessage IsSimMessage IsSimMessage

Gets a Boolean value indicating if the message is stored on a SIM card.

public : PlatForm::Boolean IsSimMessage { get; }public bool IsSimMessage { get; }Public ReadOnly Property IsSimMessage As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if the message is stored on a SIM card.

ItemKind ItemKind ItemKind ItemKind

Gets the item kind.

public : ChatItemKind ItemKind { get; }public ChatItemKind ItemKind { get; }Public ReadOnly Property ItemKind As ChatItemKind// You can use this property in JavaScript.
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

LocalTimestamp LocalTimestamp LocalTimestamp LocalTimestamp

Gets the local timestamp of the message.

public : DateTime LocalTimestamp { get; set; }public DateTimeOffset LocalTimestamp { get; set; }Public ReadWrite Property LocalTimestamp As DateTimeOffset// You can use this property in JavaScript.
Value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The local timestamp of the message.

Remarks

The value for LocalTimestamp is the local time of the device.

MessageKind MessageKind MessageKind MessageKind

Gets or sets the type of the ChatMessage.

public : ChatMessageKind MessageKind { get; set; }public ChatMessageKind MessageKind { get; set; }Public ReadWrite Property MessageKind As ChatMessageKind// You can use this property in JavaScript.

MessageOperatorKind MessageOperatorKind MessageOperatorKind MessageOperatorKind

Gets or sets a value indicating the type of message operator, such as SMS, MMS, or RCS.

public : ChatMessageOperatorKind MessageOperatorKind { get; set; }public ChatMessageOperatorKind MessageOperatorKind { get; set; }Public ReadWrite Property MessageOperatorKind As ChatMessageOperatorKind// You can use this property in JavaScript.

NetworkTimestamp NetworkTimestamp NetworkTimestamp NetworkTimestamp

Gets the network timestamp of the message.

public : DateTime NetworkTimestamp { get; set; }public DateTimeOffset NetworkTimestamp { get; set; }Public ReadWrite Property NetworkTimestamp As DateTimeOffset// You can use this property in JavaScript.
Value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The network timestamp of the message.

Remarks

The value for NetworkTimestamp is the phone network based time for the message.

Recipients Recipients Recipients Recipients

Gets the list of recipients of the message.

public : IVector<string> Recipients { get; }public IList<string> Recipients { get; }Public ReadOnly Property Recipients As IList<string>// You can use this property in JavaScript.
Value
IVector<PlatForm::String> IList<string> IList<string> IList<string>

The list of recipients of the message.

Remarks

The recipient strings in the list can be either contact names, addresses, or phone numbers.

RecipientsDeliveryInfos RecipientsDeliveryInfos RecipientsDeliveryInfos RecipientsDeliveryInfos

Gets the delivery info for each of the recipients of the ChatMessage.

public : IVector<ChatRecipientDeliveryInfo> RecipientsDeliveryInfos { get; }public IList<ChatRecipientDeliveryInfo> RecipientsDeliveryInfos { get; }Public ReadOnly Property RecipientsDeliveryInfos As IList<ChatRecipientDeliveryInfo>// You can use this property in JavaScript.
Value
IVector<ChatRecipientDeliveryInfo> IList<ChatRecipientDeliveryInfo> IList<ChatRecipientDeliveryInfo> IList<ChatRecipientDeliveryInfo>

The delivery info for the recipients of the ChatMessage.

RecipientSendStatuses RecipientSendStatuses RecipientSendStatuses RecipientSendStatuses

Gets the list of send statuses for the message.

public : IMapView<string, ChatMessageStatus> RecipientSendStatuses { get; }public IReadOnlyDictionary<string, ChatMessageStatus> RecipientSendStatuses { get; }Public ReadOnly Property RecipientSendStatuses As IReadOnlyDictionary<string, ChatMessageStatus>// You can use this property in JavaScript.
Value
IMapView<PlatForm::String, ChatMessageStatus> IReadOnlyDictionary<string, ChatMessageStatus> IReadOnlyDictionary<string, ChatMessageStatus> IReadOnlyDictionary<string, ChatMessageStatus>

The recipient send statuses.

RemoteId RemoteId RemoteId RemoteId

Gets or sets the remote ID for the ChatMessage.

public : PlatForm::String RemoteId { get; set; }public string RemoteId { get; set; }Public ReadWrite Property RemoteId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The remote ID for the ChatMessage.

ShouldSuppressNotification ShouldSuppressNotification ShouldSuppressNotification ShouldSuppressNotification

Gets or sets a Boolean value indicating if notification of receiving the ChatMessage should be suppressed.

public : PlatForm::Boolean ShouldSuppressNotification { get; set; }public bool ShouldSuppressNotification { get; set; }Public ReadWrite Property ShouldSuppressNotification As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if notification of receiving the ChatMessage should be suppressed.

Status Status Status Status

Gets the status of the message. Typical states include draft, sent, received, deleted, etc.

public : ChatMessageStatus Status { get; set; }public ChatMessageStatus Status { get; set; }Public ReadWrite Property Status As ChatMessageStatus// You can use this property in JavaScript.

Subject Subject Subject Subject

Gets the subject of the message.

public : PlatForm::String Subject { get; set; }public string Subject { get; set; }Public ReadWrite Property Subject As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The subject of the message.

SyncId SyncId SyncId SyncId

The ID used to identify a message across devices. This ID is generated on creation for all messages. Clients that copy messages between devices also need to copy this ID in order to uniquely identify the same message on different devices

public : PlatForm::String SyncId { get; set; }public string SyncId { get; set; }Public ReadWrite Property SyncId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

Gets and sets the sync ID.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

ThreadingInfo ThreadingInfo ThreadingInfo ThreadingInfo

Gets or sets the conversation threading info for the ChatMessage.

public : ChatConversationThreadingInfo ThreadingInfo { get; set; }public ChatConversationThreadingInfo ThreadingInfo { get; set; }Public ReadWrite Property ThreadingInfo As ChatConversationThreadingInfo// You can use this property in JavaScript.

TransportFriendlyName TransportFriendlyName TransportFriendlyName TransportFriendlyName

Gets the transport friendly name of the message.

public : PlatForm::String TransportFriendlyName { get; }public string TransportFriendlyName { get; }Public ReadOnly Property TransportFriendlyName As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The transport friendly name of the message.

TransportId TransportId TransportId TransportId

Gets or sets the transport ID of the message.

public : PlatForm::String TransportId { get; set; }public string TransportId { get; set; }Public ReadWrite Property TransportId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The transport ID of the message.

Remarks

Setting this property assigns the transport, SIM slot, to use for sending the chat message. Querying this property will identify the transport that the message was received on or is currently set for sending.

The value for TransportId is the string representation of the SIM slot number.