Exemple #1
0
        private void CreateNotification(string title, string description)
        {
            var notification = new SampleNotification(Guid.NewGuid())
            {
                Title = title,
                AlwaysVisibleDetails = new List <string>
                {
                    description
                },
                AllowsUserToDismiss = true
            };

            _notificationGroup.Notifications.Add(notification);
            Action action = () => ClearNotification(notification);
            var    clearNotificationCommand = new NotificationCommand(action);

            notification.ClearNotificationAction = clearNotificationCommand;
        }
Exemple #2
0
 private void ClearNotification(SampleNotification notification)
 {
     _eventAggregator.Publish(new RemoveStudioNotificationFromGroupEvent(NotificationGroupId, notification.Id));
 }