void DisplayWebImageToast(ToastTemplateType templateType) { IToastNotificationContent toastContent = null; string toastImageSrc = Scenario3ImageUrl.Text; if (templateType == ToastTemplateType.ToastImageAndText01) { IToastImageAndText01 templateContent = ToastContentFactory.CreateToastImageAndText01(); templateContent.TextBodyWrap.Text = "Body text that wraps"; templateContent.Image.Src = toastImageSrc; templateContent.Image.Alt = ALT_TEXT; toastContent = templateContent; } else if (templateType == ToastTemplateType.ToastImageAndText02) { IToastImageAndText02 templateContent = ToastContentFactory.CreateToastImageAndText02(); templateContent.TextHeading.Text = "Heading text"; templateContent.TextBodyWrap.Text = "Body text that wraps."; templateContent.Image.Src = toastImageSrc; templateContent.Image.Alt = ALT_TEXT; toastContent = templateContent; } else if (templateType == ToastTemplateType.ToastImageAndText03) { IToastImageAndText03 templateContent = ToastContentFactory.CreateToastImageAndText03(); templateContent.TextHeadingWrap.Text = "Heading text that wraps"; templateContent.TextBody.Text = "Body text"; templateContent.Image.Src = toastImageSrc; templateContent.Image.Alt = ALT_TEXT; toastContent = templateContent; } else if (templateType == ToastTemplateType.ToastImageAndText04) { IToastImageAndText04 templateContent = ToastContentFactory.CreateToastImageAndText04(); templateContent.TextHeading.Text = "Heading text"; templateContent.TextBody1.Text = "Body text"; templateContent.TextBody2.Text = "Another body text"; templateContent.Image.Src = toastImageSrc; templateContent.Image.Alt = ALT_TEXT; toastContent = templateContent; } rootPage.NotifyUser(toastContent.GetContent(), NotifyType.StatusMessage); // Create a toast from the Xml, then create a ToastNotifier object to show // the toast ToastNotification toast = toastContent.CreateNotification(); // If you have other applications in your package, you can specify the AppId of // the app to create a ToastNotifier for that application ToastNotificationManager.CreateToastNotifier().Show(toast); }