{"id":13342212,"url":"https://github.com/lemutec/NotifyIconEx","last_synced_at":"2025-03-12T00:31:06.273Z","repository":{"id":249215739,"uuid":"830888673","full_name":"lemutec/NotifyIconEx","owner":"lemutec","description":"Support dark mode theme NotifyIcon in WPF / WinForms / Avalonia / WinUI / MAUI.","archived":false,"fork":false,"pushed_at":"2024-08-16T08:03:48.000Z","size":78,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T13:44:39.677Z","etag":null,"topics":["avalonia","maui","notifyicon","winforms","winui","wpf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lemutec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-19T07:59:17.000Z","updated_at":"2025-01-08T15:14:10.000Z","dependencies_parsed_at":"2024-07-19T11:19:14.728Z","dependency_job_id":"bf7675de-69ad-4249-bbf7-ff51b1bf901b","html_url":"https://github.com/lemutec/NotifyIconEx","commit_stats":{"total_commits":51,"total_committers":2,"mean_commits":25.5,"dds":"0.019607843137254943","last_synced_commit":"640bd600c747b17f44c43450537ce78f014ea5cc"},"previous_names":["lemutec/notifyiconex"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemutec%2FNotifyIconEx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemutec%2FNotifyIconEx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemutec%2FNotifyIconEx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemutec%2FNotifyIconEx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemutec","download_url":"https://codeload.github.com/lemutec/NotifyIconEx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243136265,"owners_count":20241987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avalonia","maui","notifyicon","winforms","winui","wpf"],"created_at":"2024-07-29T19:28:08.644Z","updated_at":"2025-03-12T00:31:05.821Z","avatar_url":"https://github.com/lemutec.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NotifyIconEx [![NuGet](https://img.shields.io/nuget/v/NotifyIconEx.svg)](https://nuget.org/packages/NotifyIconEx) [![Actions](https://github.com/lemutec/NotifyIconEx/actions/workflows/library.nuget.yml/badge.svg)](https://github.com/lemutec/NotifyIconEx/actions/workflows/library.nuget.yml) [![Platform](https://img.shields.io/badge/platform-Windows-blue?logo=windowsxp\u0026color=1E9BFA)](https://dotnet.microsoft.com/zh-cn/download/dotnet/latest/runtime)\n\nNotifyIconEx is an easy-to-use library for displaying NotifyIcon (notification icon) in `WPF` / `WinForms` / `Avalonia` / `WinUI` / `MAUI` / `Wice` applications, offering non-intrusive system notifications and quick access functionality in the taskbar.\n\n\u003e Support dark mode / show icon / checkable / submenus.\n\u003e\n\u003e You should enable the HiDPI in your Application for better rendering.\n\n## Usage\n\nNotifyIconEx is available as [NuGet package](https://www.nuget.org/packages/NotifyIconEx).\n\n```csharp\nusing NotifyIconEx;\n\nvar notifyIcon = new NotifyIcon()\n{\n    Text = \"NotifyIcon\",\n    Icon = Icon.ExtractAssociatedIcon(Process.GetCurrentProcess().MainModule?.FileName!)!\n};\nnotifyIcon.AddMenu(\"MenuItem1\", new Bitmap(ResourceHelper.GetStream(\"pack://application:,,,/Assets/Images/Lock.png\")));\nvar toDisableItem = notifyIcon.AddMenu(\"MenuItem2\", new Bitmap(ResourceHelper.GetStream(\"pack://application:,,,/Assets/Images/Lock.png\")));\nnotifyIcon.AddMenu(\"-\");\nnotifyIcon.AddMenu(\"MenuItem3\");\nnotifyIcon.AddMenu(\"MenuItem4\", true);\nnotifyIcon.AddMenu(\"MenuItem5\", OnClick);\nnotifyIcon.AddMenu(\"-\");\nnotifyIcon.AddMenu(\"SubMenu\", null!,\n[\n    new ToolStripMenuItem(\"SubMenuItem1\"),\n    new ToolStripMenuItem(\"SubMenuItem2\"),\n    new ToolStripMenuItem(\"SubMenuItem3\"),\n    new ToolStripMenuItem(\"SubSubMenu\", null!,\n    [\n        new ToolStripMenuItem(\"SubSubMenuItem1\"),\n        new ToolStripMenuItem(\"SubSubMenuItem2\"),\n        new ToolStripMenuItem(\"SubSubMenuItem3\")\n    ])\n]);\nnotifyIcon.AddMenu(\"-\");\nnotifyIcon.AddMenu(\"Exit\", (_, _) =\u003e Current.Shutdown());\nnotifyIcon.BalloonTipShown += OnBalloonTipShown;\n\ntoDisableItem.Enabled = false;\n\nvoid OnBalloonTipShown(object? sender, EventArgs e)\n{\n    Debug.WriteLine(\"OnBalloonTipShown\");\n}\n\nvoid OnClick(object? sender, EventArgs e)\n{\n    notifyIcon.BalloonTipTitle = \"Title\";\n    notifyIcon.BalloonTipText = \"This Balloon Tips\";\n    notifyIcon.ShowBalloonTip(5);\n}\n```\n\nYou can set the context menu theme like following:\n\n```csharp\n// NotifyIcon default theme follows the system theme.\n// Change it to Dark theme.\nNotifyIcon.Theme = NotifyIconTheme.Dark;\n```\n\n## Demo\n\n1. [NotifyIcon.Demo.Avalonia](https://github.com/lemutec/NotifyIconEx/tree/master/NotifyIcon.Demo.Avalonia) for [Avalonia](https://github.com/AvaloniaUI/Avalonia) Application.\n\n2. [NotifyIcon.Demo.Maui](https://github.com/lemutec/NotifyIconEx/tree/master/NotifyIcon.Demo.Maui) for [MAUI](https://github.com/dotnet/maui) Application.\n3. [NotifyIcon.Demo.WPF](https://github.com/lemutec/NotifyIconEx/tree/master/NotifyIcon.Demo.WPF) for [WPF](https://github.com/dotnet/wpf) Application.\n4. [NotifyIcon.Demo.Wice](https://github.com/lemutec/NotifyIconEx/tree/master/NotifyIcon.Demo.Wice) for [Wice](https://github.com/aelyo-softworks/Wice) Application.\n5. [NotifyIcon.Demo.WinForm](https://github.com/lemutec/NotifyIconEx/tree/master/NotifyIcon.Demo.WinForm) for [WinForms](https://github.com/dotnet/winforms) Application.\n6. [NotifyIcon.Demo.WinUI](https://github.com/lemutec/NotifyIconEx/tree/master/NotifyIcon.Demo.WinUI) for [WinUI](https://github.com/microsoft/microsoft-ui-xaml) Application.\n\n## Repository\n\nThe source code for NotifyIcon is hosted on GitHub. You can find it at the following URL: [https://github.com/lemutec/NotifyIconEx](https://github.com/lemutec/NotifyIconEx)\n\n## License\n\nNotifyIconEx is released under the MIT license. This means you are free to use and modify it, as long as you comply with the terms of the license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemutec%2FNotifyIconEx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemutec%2FNotifyIconEx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemutec%2FNotifyIconEx/lists"}