dotnet/winforms

ContextMenuStrip not opening when moving window on secondary display

開放

#4,084 建立於 2020年10月11日

 (6 則留言) (0 個反應) (0 位負責人)C# (922 個分叉)batch import
:beetle: bugarea-HDPIarea-controls-StripControlshelp wanted

倉庫指標

星標
 (4,100 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

  • .NET Core Version: 3.1
  • Have you experienced this same bug with .NET Framework?: Haven't tried. I need to use .NET Core

Problem description: Given

  • a WPF app
  • that uses the WinForms ContextMenuStrip
  • in a dual monitor setup
  • when moving the MainWindow to the secondary monitor
  • the context menu does not display at all

Expected behavior: The context menu is displayed

Minimal repro: Repo: https://github.com/ccornici/tray_context_menu_bug

Demo (contained in the repo too) ctx_bug

Other details:

  • All other tray icons from other apps (ex: Spotify, NVidia Control Panel etc) work as expected. So it doesn't look like a WIn 10 bug that affects any and all tray icons.
  • The Opening event of the ContextMenuStrip gets fired. It simply doesn't display the context menu...

貢獻者指南