我正在尝试将关联文件类型设置为Windows Phone应用程序,那么它的正确代码是什么?
答案 0 :(得分:3)
您可以这样做,但仅适用于Windows Phone 8。
Auto-launching apps using file and URI associations for Windows Phone 8
如前所述,它由清单文件完成:
<Extensions>
<FileTypeAssociation Name="Windows Phone SDK test file type" TaskID="_default" NavUriFragment="fileToken=%s">
<Logos>
<Logo Size="small" IsRelative="true">Assets/sdk-small-33x33.png</Logo>
<Logo Size="medium" IsRelative="true">Assets/sdk-medium-69x69.png</Logo>
<Logo Size="large" IsRelative="true">Assets/sdk-large-176x176.png</Logo>
</Logos>
<SupportedFileTypes>
<FileType ContentType="application/sdk">.sdkTest1</FileType>
<FileType ContentType="application/sdk">.sdkTest2</FileType>
</SupportedFileTypes>
</FileTypeAssociation>
</Extensions>