NotificationsExtensions.Toasts.ToastContent.GetContent C# (CSharp) Method

GetContent() public method

Retrieves the notification XML content as a string, so that it can be sent with a HTTP POST in a push notification.
public GetContent ( ) : string
return string
        public string GetContent()
        {
            return ConvertToElement().GetContent();
        }

Usage Example

        private void SendToastNotification()
        {
            ToastContent content = new ToastContent()
            {
            Launch = "lei",

            Visual = new ToastVisual()
            {
            TitleText = new ToastText()
            {
                Text = "New message from Lei"
            },

            BodyTextLine1 = new ToastText()
            {
                Text = "NotificationsExtensions is great!"
            },

            AppLogoOverride = new ToastAppLogo()
            {
                Crop = ToastImageCrop.Circle,
                Source = new ToastImageSource("http://messageme.com/lei/profile.jpg")
            }
            },

            Actions = new ToastActionsCustom()
            {
            Inputs =
            {
                new ToastTextBox("tbReply")
                {
                    PlaceholderContent = "Type a response"
                }
            },

            Buttons =
            {
                new ToastButton("reply", "reply")
                {
                    ActivationType = ToastActivationType.Background,
                    ImageUri = "Assets/QuickReply.png",
                    TextBoxId = "tbReply"
                }
            }
            },

            Audio = new ToastAudio()
            {
            Src = new Uri("ms-winsoundevent:Notification.IM")
            }
            };

            DataPackage dp = new DataPackage();
            dp.SetText(content.GetContent());
            Clipboard.SetContent(dp);

            ToastNotificationManager.CreateToastNotifier().Show(new ToastNotification(content.GetXml()));
        }
All Usage Examples Of NotificationsExtensions.Toasts.ToastContent::GetContent