2014-10-08 31 views
0

我试图让一个弹出窗口出现在任务栏上方,而不管主窗口位置如何。 我们可以在WPF中做什么来实现这一目标?将任务栏WPF上方弹出?

如何让WPF弹出窗口始终显示在Windows任务栏上方? 谢谢!

+0

总是尝试使用状态较少的窗口。 – pushpraj 2014-10-08 12:59:40

+0

你是否在像实现通知图标?如果是这样,[Codeproject](http://www.codeproject.com/Articles/36468/WPF-NotifyIcon)上有很好的实现。 – Krishna 2014-10-08 13:04:00

回答

0

在表单加载事件中进行修改。

int screenWidth = Screen.PrimaryScreen.WorkingArea.Height-(表单弹窗的宽度);

int screenHeight = Screen.PrimaryScreen.WorkingArea.Width-(height of your form popup);

this.Location = new Point(screenWidth,screenHeight);