Windows Phone local toast notification Text wrapping and image is not showing

425 views Asked by At

In my application, sending toast notification from the application itself.

    ToastTemplateType toastTemplateXml = ToastTemplateType.ToastText03;
    XmlDocument toastXml = ToastNotificationManager.GetTemplateContent(toastTemplateXml);              

    XmlNodeList toastTextAttributes = toastXml.GetElementsByTagName("text");
    toastTextAttributes[0].InnerText = "Welcome to My app! Let us know how you heared about us.";
    string text = DateTime.Now.ToString("MM-dd-yyyy hh:mm:ss",
                    CultureInfo.InvariantCulture);
    toastTextAttributes[1].InnerText = text;
    ToastNotification toast = new ToastNotification(toastXml);
    ToastNotificationManager.CreateToastNotifier().Show(toast);

And in the document it shows

ToastText03

One string of bold text wrapped across the first and second lines, one string of regular text on the third line.

But when it shows, The first line is not wrapping at all and it lost it's tail part.

What I need to display full first line of the toast notification?

1

There are 1 answers

1
Rob Caplan - MSFT On BEST ANSWER

There is no way around this. Windows Phone 8.12 supports only the toastText02 template. This template displays the app's logo along with two strings on the same line, with the first string bold.

See the toast template catalog for details and an example image.