Windows 8 のトースト通知機能を提供します。
Beispiel #1
0
        protected override void NotifyCore(string header, string body, Action activated, Action<Exception> failed)
        {
            var toast = new Toast(header, body);
            toast.Activated += activated;
            if (failed != null) toast.ToastFailed += () => failed(new Exception("Toast failed."));

            toast.Show();
        }
 public void Show(NotifyType type, string header, string body, Action activated, Action<Exception> failed = null)
 {
     var toast = new Toast(header, body);
     toast.Activated += (sender, args) => activated();
     if (failed != null)
         toast.ToastFailed += (sender, args) => failed(args.ErrorCode);
     sound.SoundOutput(header, true);
     toast.Show();
 }