使用WPF应用程序最小化到系统托盘(不使用的NotifyIcon) [英] Minimizing Application to system tray using WPF ( Not using NotifyIcon )
问题描述
我说完让我的应用程序,现在我想收编最小化到系统托盘功能它。我读了一篇好文章最大限度地减少应用程序到系统托盘。我意识到,这些利用Windows.Form类。
I am finished making my application and now I want to incorporate " minimizing into the system tray feature " for it . I read up a good article minimize app to system tray . I realized that these make use of the Windows.Form class .
不幸的是我已经使用的Windows Presentation Foundation中参考WPF 让我的应用程序的用户界面。现在我看到的NotifyIcon不WPF支持。我看到有CodePlex上模拟NotifyIcon的属性的开源库 WPF的Contrib 一>我没有用它尚未。
Unfortunately I have used Windows Presentation Foundation WPF reference to make my applications UI . Now I see that the NotifyIcon is not supported in WPF. I see that there is an open source library on CodePlex that simulates the NotifyIcon properties WPF Contrib I have not used it as yet .
现在我进退两难。这里是我的问题: -
Now I am in a fix . Here are my questions :-
A)我不想集成了3'rd党库只是一个单一的组成部分。
a) I don't want to incorporate a 3'rd party library just for one single component .
二)我可以做最小化功能不会对WPF NotifyIcon的?如果是的话怎么能有人给我带领好吗?
b) Can I do the minimizing feature without NotifyIcon on WPF? If yes then how can someone give me leads please ?
或者,也许我应该恢复我的UI重新使用Windows窗体?
Or maybe I should revert my UI back to using Windows Forms ?
推荐答案
如果你会重新考虑你不愿意使用外部组件,我建议WPF的NotifyIcon 。我用它。它的简单和行之有效的。
If you'll reconsider your reluctance to using an external component, I recommend WPF NotifyIcon. I've used it. It's straightforward and works well.
这并不仅仅依靠相应的WinForms组件,但它利用以显示WPF框架的几个特点纯粹的独立控制丰富的工具提示,弹出窗口,上下文菜单和气球消息。
It does not just rely on the corresponding WinForms component, but is a purely independent control which leverages several features of the WPF framework in order to display rich tooltips, popups, context menus, and balloon messages.
这篇关于使用WPF应用程序最小化到系统托盘(不使用的NotifyIcon)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!