ShareTarget (extensions schema for Windows 8.1)

Declares an app extension point of type windows.shareTarget. The app can share the specified types of files.

Element hierarchy

<Extension>
<ShareTarget>

Syntax

<ShareTarget m:Description? = A string between 1 and 255 characters in length. >

  <!-- Child elements -->
  SupportedFileTypes?,
  DataFormat{0,10000}

</ShareTarget>

Key

?   optional (zero or one) {}   specific range of occurrences

Attributes and Elements

Attributes

Attribute Description Data type Required Default value
m:Description

The description of the shared target. This string is localizable.

A string between 1 and 255 characters in length. No

 

Child Elements

Child Element Description
DataFormat

Specifies a data package format such as text or HTML format that the app can share. It is unique per application in the package and is case sensitive.

SupportedFileTypes (type: CT_CharmsSupportedFileTypes)

Defines the file types that the app can share.

 

Parent Elements

Parent Element Description
Extension (type: CT_ApplicationExtension)

Declares an extensibility point for the app.

 

Remarks

The Share charm provides access to a list of target apps that can receive data that the user wants to share. This extensibility point enables your app to be included in the list of share targets.

ShareTarget must specify either SupportedFileTypes element, or at least one DataFormat element. It can't omit both. The schema allows omitting both, but semantic validation will fail.

Examples

<Extension Category="windows.shareTarget">
  <ShareTarget>
    <SupportedFileTypes>
      <SupportsAnyFileType />
    </SupportedFileTypes>
    <DataFormat>Text</DataFormat>
    <DataFormat>Uri</DataFormat>
    <DataFormat>Bitmap</DataFormat>
    <DataFormat>Html</DataFormat>
    <DataFormat>http://schema.org/Book</DataFormat>
  </ShareTarget>
</Extension>

See also

Tasks Adding share

Concepts App contracts and extensions

Requirements

Value
Namespace http://schemas.microsoft.com/appx/2010/manifest