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%\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:
Added By: jun yang 5 at: 2/24/2015 10:53:05 AM
This id should be specified in the application shortcut located in the "%APPDATA%\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
Question Comments
Added By: jun yang 5 at: 2/24/2015 10:53:05 AM
Hi,
Will it work on Windows 7 with .NET 4.5.1 installed?
Jun
Added By: Ivan (DevExpress Support) at: 2/24/2015 11:41:52 AMYes, it should work there. Moreover, I tested the NotificationService on Windows XP in the past, and it also worked properly.