WidgetManager.SendMessageToContent(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Send a string message to the web content in a widget being displayed in the widgets host.
public:
virtual void SendMessageToContent(Platform::String ^ widgetId, Platform::String ^ message) = SendMessageToContent;
void SendMessageToContent(winrt::hstring const& widgetId, winrt::hstring const& message);
public void SendMessageToContent(string widgetId, string message);
function sendMessageToContent(widgetId, message)
Public Sub SendMessageToContent (widgetId As String, message As String)
Parameters
- widgetId
-
String
Platform::String
winrt::hstring
The ID of the widget. This is the value provided in the Id property of the WidgetContext object passed into the provider's implementation of IWidgetProvider.CreateWidget.
- message
-
String
Platform::String
winrt::hstring
A string containing the message to be sent to the widget web content.
Implements
Remarks
The message string can be simple text or the serialized form of an object interpreted by the web content. For more information, see PostWebMessageAsString.