Udostępnij za pośrednictwem


ChatConversation Class

Definition

Represents a conversation in a chat client.

public ref class ChatConversation sealed
public ref class ChatConversation sealed : IChatItem
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ChatConversation final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ChatConversation final : IChatItem
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ChatConversation
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ChatConversation : IChatItem
Public NotInheritable Class ChatConversation
Public NotInheritable Class ChatConversation
Implements IChatItem
Inheritance
Object Platform::Object IInspectable ChatConversation
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)
App capabilities
chat chatSystem smsSend

Remarks

Call the ChatMessageStore.GetConversationAsync or ChatMessageStore.GetConversationFromThreadingInfoAsync method to get an instance of this class.

Version history

Windows version SDK version Value added
1511 10586 CanModifyParticipants

Properties

CanModifyParticipants

Gets or sets a boolean that indicates whether participants can be modified or not.

HasUnreadMessages

Gets a Boolean value indicating if there are unread messages in the ChatConversation.

Id

Gets the unique identifier for the ChatConversation.

IsConversationMuted

Gets or sets a Boolean value indicating if the ChatConversation is muted.

ItemKind

Gets the item kind.

MostRecentMessageId

Gets the ID of the most recent message in the conversation.

Participants

Gets a list of all the participants in the conversation.

Subject

Gets or sets the subject of a group conversation.

ThreadingInfo

Gets the threading info for the ChatConversation.

Methods

DeleteAsync()

Asynchronously deletes all of the messages in the ChatConversation and the conversation itself.

GetMessageReader()

Gets the ChatMessageReader for this ChatConversation.

MarkMessagesAsReadAsync()

Asynchronously marks all the messages in the conversation as read.

MarkMessagesAsReadAsync(DateTime)

Asynchronously marks all the messages in the conversation before the specified DateTime as read.

NotifyLocalParticipantComposing(String, String, Boolean)

Call this to indicate that the local participant has started or has completed typing.

NotifyRemoteParticipantComposing(String, String, Boolean)

Locally triggers the event that indicates that a remote participant is typing.

SaveAsync()

Asynchronously saves the ChatConversation.

Events

RemoteParticipantComposingChanged

Occurs when the remote user has started or finished typing.

Applies to