Adding Your App to the Extras Menu

,

To indicate to the Windows Phone picture viewer that your app should be included in the Extras menu, the inclusion of an XML file called Extras.xml is required in the root of your XAP file.

To add the Extras.xml file to your project, follow these steps:

1. Right-click the name of your project in the Solution Explorer and select Add, New Item.

2. On the Add New Item page, select XML File; then name the file Extras.xml.

3. Select Add.


Note

Make sure that the Extras.xml file is set to Content. Contrary to the official documentation on MSDN, the Copy to Output Directory option should be set to Do Not Copy. You can do this via the Visual Studio Properties window after selecting the file in the Solution Explorer.


Edit the Extras.xml file so that it matches Listing 20.1.

LISTING 20.1. Extras.xml


<?xml version="1.0" encoding="utf-8" ?>
<Extras>
    <PhotosExtrasApplication>
        <Enabled>true</Enabled>
    </PhotosExtrasApplication>
</Extras>


When an app is installed on the phone, the OS scans the XAP file. When it discovers the Extras.xml file, it adds your app to the picture viewer’s Extras menu.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.110.116