0
votes

I have to develop an app for Windows Phone 8. I want the user to be briefly notified without force him to face a Message Box (and consequently having to press a button to dismiss it). Are there any alternatives? I'm from Android and something similar to a Toast would be perfect. Also having the opportunity to change the text color would be nice.

Thank you in advance.

2

2 Answers

1
votes

There are toasts in Windows Phone as well but AFAIR they can be used only when your app is in the background. But there is a solution: ToastPrompt class from Coding4Fun toolkit which is visually equal to toast notification.

See details:

https://stackoverflow.com/a/13981508/1985167

1
votes

You can use ToastPrompt from Coding4Fun toolkit, like this,

 private void ToastWrapWithImgAndTitleClick(object sender, RoutedEventArgs e)
    {
        var toast = GetToastWithImgAndTitle();
        toast.TextWrapping = TextWrapping.Wrap;

        toast.Show();
    }

    private static ToastPrompt GetToastWithImgAndTitle()
    {
        return new ToastPrompt
        {
            Title = "With Image",
            TextOrientation = System.Windows.Controls.Orientation.Vertical,
            Message = LongText,
            ImageSource = new BitmapImage(new Uri("../../ApplicationIcon.png", UriKind.RelativeOrAbsolute))
        };
    }