GabourX
GabourX

Reputation: 283

Toast notification not showing when button is clicked

I am developing an app for Windows Phone 8.0 in VS2012.

I wanted to add a notification system for my app, so I searched for guides and found this one from MDSN.

I used the same methods as those in the guide, but the notification doesn't appear when I click the button.

Here's the event handler method:

private void Button_Click_1(object sender, RoutedEventArgs e)
{
    ShellToast toast = new ShellToast();
    toast.Content = "Hello!";
    toast.Title = "StackOverFlow";
    toast.Show();
}

Upvotes: 0

Views: 481

Answers (1)

Ertay Shashko
Ertay Shashko

Reputation: 1257

I don't think you can use the native Toasts within your own app. These can be used via background tasks when you app is not running.

An alternative is using Coding4Fun Toolkit which has a ToastPrompt that can be used within the app.

Or if you don't want to get the whole Coding4Fun package, you can get Toastinet instead.

Both are also available on Nuget.

Upvotes: 2

Related Questions