This is a migrated thread and some comments may be shown as answers.

Desktop Alert from Windows Service

1 Answer 65 Views
DesktopAlert
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Veteran
Iron
Iron
Joel asked on 09 Sep 2019, 03:18 PM

I am creating a Windows Service that needs to show status alerts to the user.  So, I'll put an icon in the system tray and post alerts when events happen.  Do you have a working example as to how this can be done?

Thanks for your help,

Joel

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 11 Sep 2019, 01:36 PM

Hello Joel,

We don't have an example that shows how to set up a Windows Service and show the alert in this case, however, this shouldn't be any different than showing the alert in a basic scenario. To achieve your requirement, you can create a new WPF application and set up your service, and the RadDesktopAlert control there. Then you can subscribe to an event of the service which fires when the status changes and after this display the alert in the event handler. For example:

private RadDesktopAlertManager manager = new RadDesktopAlertManager(); 
public void OnServiceStatusChanged(string newStatusMessage) { var alert = new RadDesktopAlert(); alert.Header = "STATUS NOTIFICATION"; alert.Content = newStatusMessage; alert.ShowDuration = 3000; manager.ShowAlert(alert); }

Regards,
Martin Ivanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
DesktopAlert
Asked by
Joel
Top achievements
Rank 1
Veteran
Iron
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or