Hello,
I'm using a notifyIcon in my application and it doesn't work, but I saw that also the samples included in "Progress Telerik UI for WPF" don't work.
Maybe there is a windows 10 setting? I look in the settings of tray notification area but I didn't see any setting that can disable the working.
Thank you
Luigi
1 Answer, 1 is accepted
Hello Luigi,
Can you please clarify what you mean by saying that the RadNotifyIcon is "not working" - is the icon not displayed in the taskbar or is the interaction with it limited (popup or tooltip is not displayed)? Please also clarify which version of Telerik UI for WPF and .NET you're using along with any specifications you find relevant.
Generally speaking, the control exposes a GetUserNotificationState method which can be used to control whether or not notifications are displayed depending on the user's state. This method, however, is not called in the demos from our samples application.
Nonetheless, the icon should be displayed as expected regardless of this method. To answer your question - I cannot think of any windows setting which may affect the icon in such a manner. If the icon is not displayed at all, you can check whether you're setting a different Guid when running the application in Debug and Release mode. Here's an example:
public static class GuidHelper
{
public static Guid GetGuid()
{
#if DEBUG
var guid = "7337538c-ed75-48b8-9f83-1e8b60d8db69";
#else
var guid = "e8ec639f-2aa2-4709-8526-d72fecc63b6c";
#endif
return new Guid(guid);
}
}
If none of this helps, please send over a small sample project where the icon does not work for you and specify in what aspect the functionality is not as desired. I would then be more than happy to investigate further and try to suggest a viable solution.
Regards,
Dilyan Traykov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Dylan,
I use Telerik for Wpf R3 2021 SP1, the icon is not displayed in taskbar, I'm using demo sample "Notify Icon | First look", I click on buton "Show NotifyIcon" and nothing happens. If your test works, means that the problem is inside my system.
P.S: In my application I still use version 2021.1.325.310 because of question https://www.telerik.com/forums/upgrade-from-2021-1-325-310-to-2021-3-914-45, so is not a version problem.
I'm attaching a short recording of the result I observe by running the First Look demo at my end. As you can see, the icon is shown and can be interacted with as expected.
Can you please demonstrate how this differs from the result at your end?
Sorry Dylan, I believe that your example works, but my one not.
I attached my own gif.
I hope can be useful
Thank you
Luigi
Hello Luigi,
Thank you very much for the provided recording.
What I can suggest at this point is to try the suggestions from this article: How to Fix System Tray or Icons Missing in Windows 10.
Can you please try going over all of them and let me know if any particular one resolves the issue for you?
I will be awaiting your reply.
None of that procedure had success.
I just tried with Progress Telerik UI for WPF R1 2021 SP1 and it works!
I attacched gif with test with R1 and R2 at same time.
Thank you
Luigi
Hello Luigi,
Thank you for the provided recording.
This is indeed rather peculiar.
My only remaining suspicion is that there is some conflict between the two installations of the Telerik UI for WPF suite. Would you find it possible to uninstall both versions along with any sample applications (such as the demo application from the recordings) and try to reinstall the latest version afterwards?
Please let me know how this goes.
I come back to this open question, because now demo project (R1 2022) works on my windows 11, but my notify (R3 2021) still doesn't.
I studied your demo and I replied it in a my very simple project (attached). I think that problem can be related to TrayIconSource.
As you can see the icon can be resolved by Image, but not in Radnotify (I removed it from xaml in order to start application). I observed the same behaviour in my full project: the same image is resolved eveywhere but not for TrayIconSource.
Again, if I remove the TrayIconSource setting, ShowBalloonTip doesn't work of course.
Thank you
Luigi
Hello Luigi,
I will review the sample project and get back to you with more information regarding this matter later today.
Hello Luigi,
May I ask if you could provide a bit more information regarding your latest comment? More specifically, what do you mean by the "the icon can be resolved by Image, but not in RadNotify"? After running the provided sample project, and clicking on the button, the application results in an exception.
Yes, the exception is "System.ArgumentException: 'Could not resolve image source pack://application:,,,/ShowNotifyIcon;component/".
But as you can see the same component is used for Image control and the exception is not raised there.
This is the problem, setting NotifyIcon.TrayIconSource I get an exception (and you get too, if I understood), but the image is in the correct position because it is loaded correctly for a different contro in same window, and it is used as in demo project where it works (but in different version...).
Luigi
Hello Luigi,
Upon further investigating the provided sample project, the exception is thrown if a UriKind value is not specified, as well as if the provided sample icon's Build Action is not set to Resource. I have modified the sample project, so, could you give it a try?
I tried,
Your sample works, also without urikind, but the icon should be resource.
Thank you
Luigi
Hello Luigi,
I am happy to hear that this matter is now resolved. Let me know if you need any further assistance regarding this topic.