3

Im using the WPF NotifyIcon from CodeProject. It works fine but what I noticed is that when compiling with .NET 4.0 the ContextMenu is always positioned above the taskbar, it's fine with .NET 3.5:

.NET 3.5

.NET 3.5

.NET 4.0

.NET 4.0

I played around with the position values inside the TaskbarIcon Class but the ContextMenu just doesn't want to get in front of the taskbar:

    ContextMenu.Placement = PlacementMode.AbsolutePoint;
    ContextMenu.HorizontalOffset = cursorPosition.X;
    ContextMenu.VerticalOffset = cursorPosition.Y;

I already asked about this in the comment section on CodePlex Page a few weeks ago but didn't receive an answer.

Does anyone have a solution or workaround for this?

4

1 回答 1

0

我使用的是这个类来确定任务栏的位置,然后根据它放置上下文菜单而不是光标位置。

如何以编程方式确定 Windows 任务栏是否隐藏?

于 2014-03-07T19:22:05.910 回答