【问题标题】:notifyicon in visual studio 2015 missing [duplicate]Visual Studio 2015中的通知图标丢失[重复]
【发布时间】:2016-07-08 01:21:34
【问题描述】:

我有一个 WPF 应用程序,我正在尝试按照此页面中的说明将其发送到通知托盘http://www.developer.com/net/net/article.php/3336751/C-Tip-Placing-Your-C-Application-in-the-System-Tray.htm

但我在工具箱中找不到 NotifyIcon 控件。是否有用于执行此任务的新控件?

【问题讨论】:

  • 它是一个 Winforms 控件,它不会出现在 WPF 应用程序的工具箱中。谷歌“wpf notifyicon”的基本点击。

标签: c# wpf


【解决方案1】:

NotifyIcon 在 WPF 中没有像在 Forms 中那样实现,但您仍然可以使用 Windows 窗体 NofityIcon,它驻留在 System.Windows.Forms 命名空间中。

看看这些教程,它们可能满足您的需求:

简单的解决方案,直接使用NotifyIcon:http://www.abhisheksur.com/2012/08/notifyicon-with-wpf-applications.html

更高级的解决方案,基于 NotifyIcon 的具有更多功能的新库:http://www.codeproject.com/Articles/36468/WPF-NotifyIcon

更多关于 NotifyIcon 的信息可以在这里找到:http://msdn.microsoft.com/en-us/library/system.windows.forms.notifyicon.aspx

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-02
    • 2021-11-15
    • 2016-01-30
    • 1970-01-01
    相关资源
    最近更新 更多