예제 #1
0
파일: Toast.xaml.cs 프로젝트: ckc/WinApp
 /// <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.
     }
 }
예제 #2
0
 private async void ButtonAlarmManager_Click(object sender, RoutedEventArgs e)
 {
     AlarmAccessStatus aas = await AlarmApplicationManager.RequestAccessAsync();
 }