Ma come farlo? Qual'è il metodo più semplice?
Vediamolo...
Fare le seguenti modifiche nel file App.xaml.cs:
1) Aggiunta dei namespace
using Windows.UI.ApplicationSettings; using Windows.UI.Popups;
2)Aggiunta dell'handler nel metodo OnLaunched()
SettingsPane.GetForCurrentView().CommandsRequested += SettingCharmManager_CommandsRequested;
3) Implementazione dell'handler
private void SettingCharmManager_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
args.Request.ApplicationCommands.Add(new SettingsCommand("privacypolicy", "Privacy policy", OpenPrivacyPolicy));
}
4) Aggiunta del metodo OpenPrivacyPolicy
private async void OpenPrivacyPolicy(IUICommand command)
{
Uri uri = new Uri("http://il_mio_sito/la_privacy.html");
await Windows.System.Launcher.LaunchUriAsync(uri);
}
Nessun commento:
Posta un commento