public ToastNotification Create(AdaptiveToastModel toast) { return(new ToastNotification(toast.GetXmlDocument())); }
private void AdaptiveToast2Clicked(object sender, RoutedEventArgs e) { var adaptiveToast = new AdaptiveToastModel() { Launch = "Lauched by Adaptive toast 2", Visual = new AdaptiveVisual() { Bindings = { new AdaptiveBinding() { Template = VisualTemplate.ToastGeneric, Children = { new AdaptiveText() { Content = "Benjamin Sautermeister" }, new AdaptiveText() { Content = "Shall we meet up at 8?", }, new AdaptiveImage() { Placement = ImagePlacement.AppLogoOverride, Source = "/Assets/Images/bug.png" } } } } }, Actions = new AdaptiveActions() { Children = { new AdaptiveInput() { Id = "message", Type = InputType.Text, PlaceHolderContent = "reply here..." }, new AdaptiveAction() { ActivationType = ToastActivationType.Background, Content = "reply", Arguments = "reply" }, new AdaptiveAction() { ActivationType = ToastActivationType.Background, Content = "video call", Arguments = "video" } } } }; var toast = _toastService.AdaptiveFactory.Create(adaptiveToast); _toastService.Show(toast); }
private void AdaptiveToast3Clicked(object sender, RoutedEventArgs e) { var adaptiveToast = new AdaptiveToastModel() { Launch = "Lauched by Adaptive toast 3", Visual = new AdaptiveVisual() { Bindings = { new AdaptiveBinding() { Template = VisualTemplate.ToastGeneric, Children = { new AdaptiveText() { Content = "This is just a long bla bla text without any content, hopefully not bold like a header.", HintStyle = TextStyle.Body }, new AdaptiveImage() { Placement = ImagePlacement.AppLogoOverride, Source = "/Assets/Images/flash.png" } } } } }, Actions = new AdaptiveActions() { Children = { new AdaptiveInput() { Id = "time", Type = InputType.Selection, DefaultInput = "2", Selections = { new AdaptiveSelection() { Id = "1", Content = "First option" }, new AdaptiveSelection() { Id = "2", Content = "Second option (default)" }, new AdaptiveSelection() { Id = "3", Content = "Third option" } } }, new AdaptiveAction() { Content = "Go!", Arguments = "go" }, } } }; var toast = _toastService.AdaptiveFactory.Create(adaptiveToast); _toastService.Show(toast); }
private void AdaptiveToast1Clicked(object sender, RoutedEventArgs e) { var adaptiveToast = new AdaptiveToastModel() { Scenario = ToastScenario.Default, Launch = "Lauched by Adaptive toast 1", Duration = ToastDuration.Long, ActivationType = ToastActivationType.Foreground, Visual = new AdaptiveVisual() { Bindings = { new AdaptiveBinding() { Template = VisualTemplate.ToastGeneric, Children = { new AdaptiveText() { Content = "Header", HintStyle = TextStyle.Header, HintAlign = TextHintAlign.Center }, new AdaptiveText() { Content = "This is a sample content line", HintStyle = TextStyle.Body, HintWrap = true, }, new AdaptiveText() { Content = "This is a subheader line", HintStyle = TextStyle.Subheader, HintWrap = true, }, new AdaptiveText() { Content = "This is a subheader subtle line", HintStyle = TextStyle.SubheaderSubtle, HintWrap = true, }, new AdaptiveText() { Content = "Again a header?", HintStyle = TextStyle.Header, HintAlign = TextHintAlign.Right }, } } } }, Audio = new AdaptiveAudio() { Loop = true, Source = AdaptiveAudio.NOTIFICATION_LOOPING_CALL5 } }; var toast = _toastService.AdaptiveFactory.Create(adaptiveToast); _toastService.Show(toast); }