WPF/.net core WPF 系统托盘支持

WPF 原生不支持系统托盘图标,须要依靠其它方式处理。html

1 使用 WinForm 的支持

WPF最小到系统托盘 - Arvin.Mei - 博客园git

2 使用 wpf-notifyicon 库

hardcodet/wpf-notifyicon: NotifyIcon (aka system tray icon or taskbar icon) for the WPF platformgithub

里面的 Windowless Sample 项目,提供了最简示例。less

2 .net core WPF 的支持

对于 .net core WPF ,须要对 wpf-notifyicon 项目作一些改动才能使用。参见:ui

System Tray Icons with WPF in the .NET Core 3.0 Preview - Forty Years of Code.net

MV10/WPF.NotifyIcon.NetCore3: WPF-NotifyIcon library ported to .NET Core 3.0 Preview 1code

里面的 Windowless Sample 项目,提供了最简示例。orm


原文地址:
http://www.javashuo.com/article/p-bywbjerx-gy.htmlhtm

ENDblog

相关文章
相关标签/搜索