예제 #1
0
        public static void CreateNotification(string msg, string title = "Notificacion", bool dissappear = true, long dissappearAfter = 3000)
        {
            if (XamlFunctionality.IsWindowOpen <Notification>())
            {
                XamlFunctionality.CloseWindowInstancesOf <Notification>();
            }
            var notification = new Notification()
            {
                NotificationTitle   = title,
                NotificationContent = msg,
                DissappearAfter     = dissappearAfter,
                Visibility          = Visibility.Visible,
            };

            if (dissappear)
            {
                notification.StartTimer();
            }

            notification.InitializeComponent();
        }