Quantcast
Viewing all articles
Browse latest Browse all 7205

How to use NotificationService to show notifications

This example demonstrates how to use NotificationService to show notifications. NotificationService is used in the same manner as other services. When the UseWin8NotificationsIfAvailable option is enabled, it's necessary to use an appropriate ApplicationId. 
This id should be specified in the application shortcut located in the "%APPDATA%\Roaming\Microsoft\Windows\Start Menu\Programs" directory. This is a requirement of the technology. To create a shortcut with the required application id, you can use our DevExpress.Data.ShellHelper class as shown below:
[C#]
DevExpress.Data.ShellHelper.TryCreateShortcut("sample_notification_app","DXSampleNotificationSevice");

Then, assign sample_notification_app to the NotificationService.ApplicationId property:

[XAML]
<dxmvvm:Interaction.Behaviors>     <dxmvvm:NotificationServicex:Name="ServiceWithDefaultNotifications"ApplicationId="sample_notification_app".../></dxmvvm:Interaction.Behaviors>

An advantage of native Windows 8 notifications is that thy can be shown over WinRT applications




Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>