Telerik Forums
UI for WPF Forum
1 answer
12 views

Hi Team,

I'm trying to add a RadNotifyIcon into my telerik wpf project, but it keeps throwing the error  below in xaml file

"the name RadNotifyIcon does not exist in the current namespace".

    <telerik:RadNotifyIcon x:Name="NotifyIcon"
                                       ShowTrayIcon="False"
                                       TrayIconSource="/NotifyIcon;component/Icons/TelerikWPFNotifyIcon.ico"
                                       PopupContentTemplate="{StaticResource NotifyIconPopupContentTemplate}" />

I did follow the below options , but still not working.

  1. clean and rebuild project
  2. adding reference to the telerik.windows.controls and telerik.windows.controls.navigation
  3. deleting obj and bin folder and rebuild project
  4. close and open visual studio
  5. restart my windows 
  6. change build platform to x86 from anycpu and vice versa.

the visual studio version I'm using is Microsoft Visual Studio Community 2022 (64-bit) - Current, Version 17.4.3

Any suggestion will be helpful.

Thanks,

Lenin.

 

 

Dimitar
Telerik team
 answered on 03 Apr 2024
0 answers
64 views

H, I show a balloon tip with a text that is larger than the default size of notification area and I can't see all the text. I tried also with Configurator Example with the same result.
Is there a way to show a large text in balloon tip?
Thank you 

Luigi

Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 31 Jul 2023
1 answer
52 views

Hi,

What I'm tryin to do is create an App that starts hidden (without a RadWindow) and when you click on a context menu of NotifyIcon it shows a RadWindow. I've tried several options and none work correctly.

What would be the best approach for this scenario?

 

Thanks

Martin Ivanov
Telerik team
 answered on 30 Mar 2023
1 answer
524 views

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

Dilyan Traykov
Telerik team
 answered on 17 Nov 2021
1 answer
163 views

Hi,

When developing my WPF application using the RadNotifyIcon, I often catch myself stopping Visual Studio rather than selecting the close application menu option. This results in the tray icon not being removed. When you then restart a debugging session the old icon prevents a new icon from being created as I have a fixed appId. However, as soon as you hover over it, the icon disappears.

Everything is happening per design and in release mode where you have to close the application, everything works fine. This is just some development time frustration.

Is there a way to check on startup if the icon exists (previous remnant) and if so first clear it before creating the new icon? Alternatively, is there a "fool-proof" way to detect ungraceful application close (e.g. stop debugging in VS) to first clear the icon? 

Dilyan Traykov
Telerik team
 answered on 03 Nov 2021
1 answer
100 views

Hi,

I'm trying to simulate having an application that just runs from the system tray icon.

I can get the NotifyIcon to appear but if i set the main window to hidden it disappears, which makes sense as its part of that main window.

Is there any way to have the NotifyIcon visible but have the window it is part of hidden?

Cheers,

Steve.
Martin Ivanov
Telerik team
 answered on 07 Jul 2021
4 answers
240 views

Hello,

I'm using the Progress Telerik UI for WFP sample application (R1 2021 SP1) to review the capabilities of RadNotifyIcon.

Unfortunately, the balloon features are not working at all for me. For example, navigating to the "Notify Icon Configurator" sample app, the "Show balloon" and "Hide balloon" both do nothing.

Everything else seems fine - the icon is visible, and the popup features are working. Just the balloon messages are not.

I'm running the latest build of Windows 10 with two 4k monitors are 200% scaling.

Any thoughts on a fix or workaround would be appreciated.

- Mark R.

Vladimir Stoyanov
Telerik team
 answered on 23 Apr 2021
5 answers
247 views

We are working on project and using Telerik with MVVM approach using Prism framework.
We want to notify user about some tasks or messages for which we have used RadNotifyIcon.
We are able to notify user but we want to give a link in the notification on click of which user will be redirected to some internal Menu page(a XAML page within the application).
For Menu control we have used Rad Navigation View(Hamburger Menu) and it is working fine when navigated from one menu to another.
We are facing a challenge in achieving the same using PRSIM MVVM approach. We are not getting the click event(Command) of the hyperlink present in NotifyIcon to ViewModel to navigate to the view.
Kindly help us to achieve this. Below is our code let us know where are we going wrong or is there any other way to navigate to existing view using Radnotifyicon link click?

We have tried RadHyperlink control as well as RadRadioButton. Both are not working

Below is the designer code:

<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:av="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:prism="http://prismlibrary.com/"
    mc:Ignorable="av" x:Class="Voyager.Views.Notifications"
    prism:ViewModelLocator.AutoWireViewModel="True"
             av:DesignWidth="718.431" av:DesignHeight="416.528">
    <UserControl.Resources>
        <DataTemplate x:Key="CalloutContentTemplate">
            <StackPanel Width="300">
                <telerik:RadButton Cursor="Hand" IsBackgroundVisible="False"
                                   Padding="0" VerticalAlignment="Top" HorizontalAlignment="Right"
                                   Command="{x:Static telerik:WindowCommands.Close}">
                    <telerik:RadGlyph Glyph="&#xE11B;"/>
                </telerik:RadButton>
                <Image Source="/Images/Splash3.PNG" />
                <TextBlock TextWrapping="Wrap" MaxWidth="200" x:Name="Notification" FontWeight="Bold"  Margin="0 0 0 10"/>

<!--<telerik:RadHyperlinkButton x:Name="RadHyperlinkButton1" Content="Click here to open Telerik WPF Documentation"  Command="{Binding MyCommand}" CommandParameter="InternetUsage"-->
                <telerik:RadRadioButton Command="{Binding MyCommand}"
                                    CommandParameter="InternetUsage"
                                    Tag="ACTIVITIES" Style="{StaticResource RadRadioButtonLargeStyle}"/>
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="NotifyIconPopupContentTemplate">
            <telerik:RadCallout x:Name="CalloutButton"  ArrowAnchorPoint="0.8,1.1"
                                ArrowBasePoint1="1,0.5"
                                ArrowBasePoint2="0.6,0.5"
                                ArrowType="Triangle"
                                Padding="10 15"
                                TextAlignment="Left"
                                Margin="30"
                                ContentTemplate="{StaticResource CalloutContentTemplate}"/>
        </DataTemplate>
    </UserControl.Resources>
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center" FocusManager.FocusedElement="{Binding ElementName=ShowNotifyIconButton}">
        <Border BorderThickness="1" BorderBrush="#33000000" Width="500">
            <StackPanel VerticalAlignment="Stretch">
                <TextBlock HorizontalAlignment="Center" Foreground="#FF333333" Margin="0 30 0 35" FontSize="24" Text="Welcome to RadNotifyIcon demos"/>
                <TextBlock HorizontalAlignment="Center" Margin="0 0 0 10" FontSize="16" Text="Click on the button below to show the NotifyIcon in the tray area."/>
                <TextBlock HorizontalAlignment="Center" Foreground="#FF0099BC" FontSize="12" Text="Note, that the icon may be hidden in the overflow area of the notification tray."/>
                <telerik:RadButton x:Name="ShowNotifyIconButton"
                                   Loaded="OnShowNotifyIconButtonLoaded"
                                   HorizontalAlignment="Center" MinWidth="170" Margin="0 40 0 30" Content="Show NotifyIcon" Click="OnShowNotifyIconButtonClick" />
                <telerik:RadNotifyIcon x:Name="NotifyIcon"
                                       ShowTrayIcon="True"
                                       TrayIconSource="/Images/voyager_icon_green.ico"
                                       PopupContentTemplate="{StaticResource NotifyIconPopupContentTemplate}" PopupShowDuration="10000" TrayIconMouseUp="NotifyIcon_TrayIconMouseUp"/>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>

Below is the ViewModel code:

 

   public class NotificationsViewModel : BindableBase
    {
        public IRegionManager _regionManager = null;
        public NotificationsViewModel(IRegionManager regionManager)
        {
            _regionManager = regionManager;
            MyCommand = new DelegateCommand<string>(OnCommandExecuted);
        }
        private void OnCommandExecuted(string url)
        {
            Navigate(url);
        }

        public ICommand MyCommand { get; set; }
        public void Navigate(string navigatePath)
        {
            _regionManager.RequestNavigate("ContentRegion", navigatePath);
        }
    }

 

 

Dilyan Traykov
Telerik team
 answered on 15 Apr 2021
3 answers
405 views

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

Martin Ivanov
Telerik team
 answered on 13 Nov 2020
6 answers
356 views

NotifyIcon does not showing for Core project with TargetFramework net452 or higher

TestNotifyIcon.csproj

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net452</TargetFramework>
    <UseWPF>true</UseWPF>
    <ApplicationIcon>Dashboard.ico</ApplicationIcon>
  </PropertyGroup>
  <ItemGroup>
    <None Remove="Dashboard.ico" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="Telerik.Windows.Controls">
      <HintPath>..\Telerik.Windows.Controls.dll</HintPath>
    </Reference>
    <Reference Include="Telerik.Windows.Controls.Navigation">
      <HintPath>..\Telerik.Windows.Controls.Navigation.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Resource Include="Dashboard.ico" />
  </ItemGroup>
</Project>

MainWindow.xaml

<Window x:Class="TestNotifyIcon.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
  Title="MainWindow" Height="450" Width="800"
  x:Name="_this">
 <Grid>
  <TextBlock x:Name="MessageTextBlock"
       TextAlignment="Center"
       VerticalAlignment="Center"
       Text="Test"/>
  <telerik:RadNotifyIcon x:Name="NotifyIcon"
          ShowTrayIcon="True"
          TooltipContent="{Binding Title, ElementName=_this, Mode=OneWay}"
          TrayIconSource="/TestNotifyIcon;component/Dashboard.ico"
          PopupActivationMouseEvent="All"
          PopupContent="{Binding Text, ElementName=MessageTextBlock, Mode=OneWay}">
  </telerik:RadNotifyIcon>
 </Grid>
</Window>

Vladimir Stoyanov
Telerik team
 answered on 03 Nov 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?