Beispiel #1
0
 public async void ShowNotification(string text, int duration = 0)
 {
     var vm = new InAppNotificationViewModel(_NotificationManager, _DispatcherHelper);
     await _DispatcherHelper.RunAsync(async() => {
         NotificationCollection.Add((IInAppNotificationViewModel)vm);
         await Task.Delay(250);  //stiupid workaround - we are waiting here until DataContext is set
         vm.ShowNotification(text, duration);
     });
 }
Beispiel #2
0
 public async void ShowNotification(InAppNotificationType notificationType, int duration = 0)
 {
     var vm = new InAppNotificationViewModel(_NotificationManager, _DispatcherHelper);
     await _DispatcherHelper.RunAsync(async() => {
         NotificationCollection.Add(vm);
         await Task.Delay(250);
         vm.ShowNotification(notificationType, duration);
     });
 }