wp7appdevelopment

Adventures in Windows Phone app development

Monthly Archives: December 2012

Create a Windows Phone tile with no title displayed

You can have the tile for your Windows Phone app be displayed with a blank title. This is useful if your image already contains the app title.

The only trick: you can’t directly delete the title in the ‘property editing’ mode of the Visual Studio project. Instead, edit the WMAppManifest.xml file directly to remove the title. Just remove the title between the tags. The project will still compile, and this won’t stop your app from getting approved.

<TemplateType5>
    <BackgroundImageURI ... ... ...>Background.png</BackgroundImageURI>
    <Count>0</Count>
    <Title></Title>   <-- leave this blank -->
</TemplateType5>

That’s it. Visual Studio thinks this field cannot be empty, but it can. Edit the XML file directly, and you’re good to go.

Windows 8 (Win8 Metro): Adding a privacy policy to settings panel

Simple example of adding a handler for a privacy policy to the Settings charm in a Windows 8 (Win8 metro) app.

using Windows.UI.ApplicationSettings;

protected override void OnNavigatedTo(NavigationEventArgs e)
{
    base.OnNavigatedTo(e);

    // add handler for Privacy policy on Settings Charm
    SettingsPane.GetForCurrentView().CommandsRequested += GroupedItemsPage_CommandsRequested;
}

void GroupedItemsPage_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
    AddSettingsCommands(args);
}

public static void AddSettingsCommands(SettingsPaneCommandsRequestedEventArgs args)
{
    args.Request.ApplicationCommands.Clear();

    SettingsCommand privacyPref = new SettingsCommand("privacyPref", "Privacy Policy", (uiCommand) =&gt;
{
Windows.System.Launcher.LaunchUriAsync(new Uri("http://www.example.com/privacy.html"));
});

    args.Request.ApplicationCommands.Add(privacyPref);
}