FileTypeAssociation (extensions schema for Windows 8.1)

Declares an app extensibility point of type windows.fileTypeAssociation. A file type association indicates that the app is registered to handle files of the specified types.

Element hierarchy

<Extension>
<FileTypeAssociation>

Syntax

<FileTypeAssociation Name           = A string between 1 and 100 characters in length.
                     m:DesiredView? = "default" | "useLess" | "useHalf" | "useMore" | "useMinimum" >

  <!-- Child elements -->
  ( DisplayName?
  & Logo?
  & InfoTip?
  & EditFlags?
  & SupportedFileTypes
  )

</FileTypeAssociation>

Key

?   optional (zero or one) &   interleave connector (may occur in any order)

Attributes and Elements

Attributes

Attribute Description Data type Required Default value
Name

The name of the file type association. You can use this name to organize and group file types. The name must be all lower case characters with no spaces.

A string between 1 and 100 characters in length. Yes
m:DesiredView

The desired view of the app.

Windows Phone:  DesiredView isn't supported for Windows Phone.

This attribute can have one of the following values:

  • default
  • useLess
  • useHalf
  • useMore
  • useMinimum
No

 

Child Elements

Child Element Description
DisplayName

A friendly name that can be displayed to users. This string is localizable.

EditFlags

Specifies the type of info the user sees when opening a file associated to the extensibility point.

InfoTip

Defines a string that provides additional info to the user about the file type.

Logo

A path to a file that contains an image.

SupportedFileTypes (type: CT_FTASupportedFileTypes)

Defines the file types associated with the app. They are unique per package and are case sensitive.

 

Parent Elements

Parent Element Description
Extension (type: CT_ApplicationExtension)

Declares an extensibility point for the app.

 

Examples

The following example is taken from the package manifest of one of the SDK samples.

<Application Id="App" StartPage="default.html">
    <Extensions>
      <Extension Category="windows.fileTypeAssociation">
        <FileTypeAssociation Name="alsdkjs">
          <SupportedFileTypes>
            <FileType>.alsdkjs</FileType>
          </SupportedFileTypes>
        </FileTypeAssociation>
      </Extension>
    </Extensions>
</Application>

See also

Tasks How to handle file activation

Concepts App contracts and extensions

Requirements

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