Skip to content

Use the NotificationService to create and display interactive notifications.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/wpf-notificationservice-create-interactive-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPF NotificationService - Create Interactive Notifications

NotificationService allows you to create and display feedback notifications introduced in Windows 10. Feedback notifications can be used to get a quick answer from a user. If the application has already been closed, the user can reopen it on the notification click.

image

Implementation Details

This example illustrates how to use NotificationService:

  1. Create ApplicationShortcut: MainWindow.xaml.cs (VB: MainWindow.xaml.vb).

  2. Create ApplicationActivator and register COM-Server: Activator.cs (VB: Activator.vb).

  3. Set ApplicationName and ApplicationId: MainWindow.xaml (VB: MainWindow.xaml).

  4. Create a command that invokes the notification: MainViewModel.cs (VB: MainViewModel.vb).

    The NotificationService.CreatePredefinedNotification method allows you to specify the notification's id that could be used to identify the notification with wich the user interacts. NotificationActivator passes this id to the OnActivate method's arguments parameter.

We recommend running the sample without the Visual Studio debugger. The application shortcut will be created on the first application launch in the "%APPDATA%\Microsoft\Windows\Start Menu\Programs" directory. If you move or rename the application file, you will need to manually remove the old shortcut.

Important!
Enable notifications in the Windows 10 settings before running the sample.

When the sample application is running, click the Create notification button to invoke a popup feedback notification. You can click the notification in the Windows 10 Action Center to restart the sample application once the application is closed.

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Use the NotificationService to create and display interactive notifications.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •