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); }
public void Test_Toast_Xml_ButtonDismiss_Defaults() { ToastButtonDismiss button = new ToastButtonDismiss(); AssertButtonPayload("<action activationType='system' arguments='dismiss' content=''/>", button); }
public void Test_Toast_Xml_ButtonDismiss_CustomContent() { ToastButtonDismiss button = new ToastButtonDismiss("my dismiss"); AssertButtonPayload("<action activationType='system' arguments='dismiss' content='my dismiss'/>", button); }