/// <summary>
 /// Update the scenario UI.
 /// </summary>
 private async void UpdateUI()
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                               () =>
     {
         Progress.Text = BackgroundTaskSample.ServicingCompleteTaskProgress;
         Status.Text   = BackgroundTaskSample.GetBackgroundTaskStatus(BackgroundTaskSample.ServicingCompleteTaskName);
     });
 }
 /// <summary>
 /// Update the scenario UI.
 /// </summary>
 private async void UpdateUI()
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                               () =>
     {
         RegisterButton.IsEnabled   = !BackgroundTaskSample.SampleBackgroundTaskWithConditionRegistered;
         UnregisterButton.IsEnabled = BackgroundTaskSample.SampleBackgroundTaskWithConditionRegistered;
         Progress.Text = BackgroundTaskSample.SampleBackgroundTaskWithConditionProgress;
         Status.Text   = BackgroundTaskSample.GetBackgroundTaskStatus(BackgroundTaskSample.SampleBackgroundTaskWithConditionName);
     });
 }
 /// <summary>
 /// Update the scenario UI.
 /// </summary>
 private async void UpdateUI()
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                               () =>
     {
         RegisterButton.IsEnabled   = !BackgroundTaskSample.ServicingCompleteTaskRegistered;
         UnregisterButton.IsEnabled = BackgroundTaskSample.ServicingCompleteTaskRegistered;
         Progress.Text = BackgroundTaskSample.ServicingCompleteTaskProgress;
         Status.Text   = BackgroundTaskSample.GetBackgroundTaskStatus(BackgroundTaskSample.ServicingCompleteTaskName);
     });
 }
 /// <summary>
 /// Update the scenario UI.
 /// </summary>
 private async void UpdateUI()
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                               () =>
     {
         RegisterButton.IsEnabled   = !BackgroundTaskSample.ApplicationTriggerTaskRegistered;
         UnregisterButton.IsEnabled = BackgroundTaskSample.ApplicationTriggerTaskRegistered;
         SignalButton.IsEnabled     = BackgroundTaskSample.ApplicationTriggerTaskRegistered & (trigger != null);
         Progress.Text = BackgroundTaskSample.ApplicationTriggerTaskProgress;
         Result.Text   = BackgroundTaskSample.ApplicationTriggerTaskResult;
         Status.Text   = BackgroundTaskSample.GetBackgroundTaskStatus(BackgroundTaskSample.ApplicationTriggerTaskName);
     });
 }