IWidgetManager2.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:
void SendMessageToContent(Platform::String ^ widgetId, Platform::String ^ message);
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 specified in the Id attribute of the Definition element in the provider's package manifest file. For more information see Widget provider package manifest XML format.
- message
-
String
Platform::String
winrt::hstring
A string containing the message to be sent to the widget web content.
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.
The IWidgetManager2 interface is a part of the underlying implementation of the widget framework and is not intended to be used directly by app developers who are implementing widget providers.