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?

CTrox
  • 75
  • 1
  • 9

1 Answers1

0

What I use is this class to determine the location of the task bar, and then place the context menu based on that instead of the cursor position.

How can I determine programmatically whether the Windows taskbar is hidden or not?

Community
  • 1
  • 1
Kelly Elton
  • 4,373
  • 10
  • 53
  • 97