Wednesday, May 29, 2013

Privacy Policy in Charm Bar: the easiest way

When you make a Windows Store App, if it uses any Network connection, you have to specify your Privacy Settings in both Store page and Charm Bar.

But how to do it? What's the simplest way?

So, here's the answers.

Do the following in your App.xaml.cs:

1) Add the namespaces
using Windows.UI.ApplicationSettings;
using Windows.UI.Popups;

2) Add the handler during app initialization (into OnLaunched())
SettingsPane.GetForCurrentView().CommandsRequested += SettingCharmManager_CommandsRequested;

3) Add my handler that shows the privacy text
private void SettingCharmManager_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)

    args.Request.ApplicationCommands.Add(new SettingsCommand("privacypolicy", "Privacy policy", OpenPrivacyPolicy));


4) Add OpenPrivacyPolicy method
private async void OpenPrivacyPolicy(IUICommand command)


    Uri uri = new Uri("http://my_website/my_privacy.html");
    await Windows.System.Launcher.LaunchUriAsync(uri);


Tuesday, May 14, 2013

Free technical e-book on the Microsoft platform

While a lot of information on application development is available on the internet and in books, that information is becoming harder to digest. If you do not enjoy reading several 500+ page books, or scouring the web for relevant blog posts and articles, you have come to the right place.
Syncfusion publishes the Succinctly series concise technical books that target developers working on the Microsoft platform. Each book is around 100 pages and is guaranteed to enlighten you on the topic of interest. Download a copy, get a cup of your favorite beverage, and enjoy!