Git Product home page Git Product logo

trayiconbindings's Introduction

SimpleTrayIcon

A fast, lightweight, object oriented wrapper for the Shell_NotifyIcon API with no framework dependencies.

NuGet version (SimpleTrayIcon)

Usage

var icon = new System.Drawing.Icon(typeof(Program), "SimpleTrayIcon.Demo.tray-icon.ico"); // Load an icon for the tray
using var menu = new TrayMenu(icon, "Tooltip", true);
var item = new TrayMenuItem { Content = "Item1" };
menu.Items.Add(item);
menu.Items.Add(new TrayMenuSeparator());
menu.Items.Add(new TrayMenuItem { Content = $"some content", IsChecked = true });
item.Click += (s, e) => ((TrayMenuItem)s).IsChecked = !((TrayMenuItem)s).IsChecked; // Attach an event
NativeMethods.RunLoop(); // Runs the message pump. Winforms, WPF, etc., will do this for you.

NativeAOT Linking Options

SimpleTrayIcon is fully AOT compatible.

You can build with static linking to a static library or dynamic library (with DLL).

To enable static linking to the SimpleTrayIcon DLL:

<PropertyGroup>
    <SimpleTrayIconStaticLinking>true</SimpleTrayIconStaticLinking>
</PropertyGroup>

To enable static linking to the SimpleTrayIcon static library:

<PropertyGroup>
    <SimpleTrayIconStaticLinking>true</SimpleTrayIconStaticLinking>
    <UseSimpleTrayIconStaticLib>true</UseSimpleTrayIconStaticLib>
</PropertyGroup>

OneCore

There is a OneCore SKU of the package SimpleTrayIcon.onecore which links to OneCoreUAP and VCRUNTIME140_APP. It is indeed not OneCoreUAP compatible, but is compatible with any full-trust UWP apps. This package does not support static linking.

trayiconbindings's People

Contributors

trympet avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.