Esempio n. 1
0
 /// <summary>
 /// Invoked when this page is about to be displayed in a Frame.
 /// </summary>
 /// <param name="e">Event data that describes how this page was reached.  The Parameter
 /// property is typically used to configure the page.</param>
 protected async override void OnNavigatedTo(NavigationEventArgs e)
 {
     try
     {
         await AlarmApplicationManager.RequestAccessAsync().AsTask();
     }
     catch
     {
         // RequestAccessAsync may throw an exception if the app is not currently in the foreground.
     }
 }
Esempio n. 2
0
 private async void ButtonAlarmManager_Click(object sender, RoutedEventArgs e)
 {
     AlarmAccessStatus aas = await AlarmApplicationManager.RequestAccessAsync();
 }