Hi,
Is there any way to display the new NotifyIcon in an application that doesn't have any window?
I tried putting it in app.xaml like this:
<
ResourceDictionary
>
<
telerik:RadNotifyIcon
x:Key
=
"NotifyIcon"
x:Name
=
"NotifyIcon"
ShowTrayIcon
=
"True"
TooltipContent
=
"Test"
TrayIconSource
=
"/TestNotifyIcon;component/SDK icon.ico"
GuidItem
=
"020fea20-de2d-411f-87dd-111cd1e4f7fb"
>
</
telerik:RadNotifyIcon
>
</
ResourceDictionary
>
And then in App.xaml.cs:
public
partial
class
App : Application
{
private
RadNotifyIcon _taskbarIcon;
protected
override
void
OnStartup(StartupEventArgs e)
{
base
.OnStartup(e);
_taskbarIcon = (RadNotifyIcon)FindResource(
"NotifyIcon"
);
}
protected
override
void
OnExit(ExitEventArgs e)
{
if
(_taskbarIcon !=
null
)
_taskbarIcon.Dispose();
base
.OnExit(e);
}
}
But the icon does not display...
We are currently using Hardcodet.NotifyIcon.Wpf package for this, and with that component this kind of code works, but we would like to use the Telerik component instead!
Regards
Andreas