Sharing content (HTML)

[This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation]

Sharing is how users connect the content of your app with the people they care about and the apps they use most. We've put together the following information to help you learn how to best use sharing in your app:

In this section

Topic Description

Quickstart: Sharing content

Walks you through the steps required to share content with another app.

How to share text

Sharing text is one of the most basic, yet essential, methods for sharing content. We recommend your app support sharing text:

  • When you want the content to be available to a large number of target apps.
  • As a secondary source when sharing links or sharing HTML.

How to share a link

Links, or Uniform Resource Identifiers (URIs), are another common data format that users want to share. The most common reason to share a link is when a user has specifically selected one; however, we also recommend that your app support sharing links:

  • When the content the user selects is also available online.
  • As a secondary source when sharing HTML.

How to share HTML

Sharing HTML content is different from other basic formats such as text or a link. The main challenge is that the content a user selects might contain references to other elements. Apps that support sharing HTML need to consider how to handle these references to ensure that users share the content they want.

How to share files

Users often want to share files with other people or apps. Using the sharing feature, your app can easily support tasks ranging from emailing a file to a colleague to sharing a set of pictures from a family vacation.

How to support pull operations

Most of the time, the app supplies the share data immediately from its datarequested event handler. Sometimes, however, your app may need time to get the data ready for sharing. At those times, you can provide a list of supported formats, but delay preparing and providing the content until the target app requests it. Deferring to provide content until the target app requests it is called a pull operation (or delayed sharing).

How to make asynchronous calls in your datarequested handler

Here, we'll show you how to produce data asynchronously in response to a datarequested event.


These topics talk about how to share content with other apps. We call apps that perform this role source apps. If you want to receive shared content from other apps, see Receiving shared content.