コード例 #1
0
        public void ShowErrorToastWithDismissButton(string message)
        {
            ToastVisual visual = this.toaster.GetVisualToast(message, null, null);

            var button = new ToastButtonDismiss();
            ToastActionsCustom actios = this.toaster.GetToastCustomActions(null, new List<IToastButton>() { button });
            ToastContent content = this.toaster.GetToastContent(visual, actios);
            var doc = content.GetXml();
            var notification = new ToastNotification(doc);
            ToastNotificationManager.CreateToastNotifier().Show(notification);
        }
コード例 #2
0
        public void Test_Toast_Xml_ButtonDismiss_Defaults()
        {
            ToastButtonDismiss button = new ToastButtonDismiss();

            AssertButtonPayload("<action activationType='system' arguments='dismiss' content=''/>", button);
        }
コード例 #3
0
        public void Test_Toast_Xml_ButtonDismiss_CustomContent()
        {
            ToastButtonDismiss button = new ToastButtonDismiss("my dismiss");

            AssertButtonPayload("<action activationType='system' arguments='dismiss' content='my dismiss'/>", button);
        }