Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.33 KB

chatmessagemanager_showcomposesmsmessageasync_1632642119.md

File metadata and controls

46 lines (32 loc) · 1.33 KB
-api-id -api-type -api-device-family-note
M:Windows.ApplicationModel.Chat.ChatMessageManager.ShowComposeSmsMessageAsync(Windows.ApplicationModel.Chat.ChatMessage)
winrt method
xbox

Windows.ApplicationModel.Chat.ChatMessageManager.ShowComposeSmsMessageAsync

-description

Shows the compose SMS dialog, pre-populated with data from the supplied ChatMessage object, allowing the user to send an SMS message.

-parameters

-param message

The chat message.

-returns

An asynchronous action.

-remarks

The TransportId property of the message is set to the desired outgoing transport. The ChatMessage.Body property is optionally set to any initial text. The following example shows a call to ShowComposeSmsMessageAsync with the transport and initial text for a message:

async void ComposeMessage()
{
    ChatMessage message;
    message.Body = "Sent from *SpiffyChat*: How’s your morning going?";
    message.TransportId = "0";
    message.Recipients.Add("+12065551234"); 

    await ChatMessageManager.ShowComposeSmsMessageAsync(message);
}

-examples

-see-also

-capabilities

chatSystem, smsSend, chat