TrayIcon 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package TrayIcon --version 1.0.0                
NuGet\Install-Package TrayIcon -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TrayIcon" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TrayIcon --version 1.0.0                
#r "nuget: TrayIcon, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TrayIcon as a Cake Addin
#addin nuget:?package=TrayIcon&version=1.0.0

// Install TrayIcon as a Cake Tool
#tool nuget:?package=TrayIcon&version=1.0.0                


Library that allows use Tray Icon in WPF Application. Ported from Windows Forms. Has wrapper for WPF ContexMenu (which converts it to Windows Forms ContextMenu). This is needed for good performance, and compatibility. This library targets all MVVM requirements:

  • it has bindable properties
  • it has interface with notify methods

Getting started.

First you need to include namespace to your code or markup.

For XAML it can look like:

<Window xmlns:icon="clr-namespace:NullSoftware.ToolKit;assembly=TrayIcon" />

And for C#:

using NullSoftware.ToolKit;

Then you can place tray icon inside your window, or keep it in variable/property.

Full Example:

<Window x:Class="TrayIcon.Test.MainWindow"
        Height="450" Width="800"
        <icon:TrayIcon Title="My Application" 
                       IconSource="{Binding Source='MainIcon.ico', Converter={StaticResource PathToResourceStreamConverter}}"
                       DoubleClickCommand="{Binding MinimazeCommand}"
                    <MenuItem Header="_Silent Mode" IsCheckable="True" IsChecked="{Binding IsSilentModeEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                    <MenuItem Header="E_xit" Command="{Binding CloseCommand}"/>

        <StackPanel VerticalAlignment="Top"
                    Margin="10, 20"
            <CheckBox VerticalAlignment="Center"
                      IsChecked="{Binding IsSilentModeEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                      Content="Silent Mode"/>
            <Button Margin="20, 0, 0, 0"
                    Padding="10, 3"
                    Command="{Binding SayHelloCommand}"

In Develop

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 228 3/13/2024 238 2/11/2024 89 2/10/2024
1.1.0 113 2/10/2024 12,691 3/12/2022 384 3/11/2022
1.0.7 391 3/11/2022
1.0.7-preview 148 3/11/2022 401 3/9/2022
1.0.6 385 3/9/2022 380 3/9/2022
1.0.5 385 3/9/2022 280 11/18/2021
1.0.4 249 11/18/2021
1.0.3 263 10/6/2021
1.0.2 330 10/3/2021
1.0.1 359 10/3/2021
1.0.0 442 10/3/2021

First release.