Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有上下文菜单的控件。该控件有一个子控件。我希望上下文菜单仅在用户单击其子控件未覆盖的控件区域时出现。
当然,我实际上可以使用屏幕坐标检查每个子控件。我的问题是:是否有任何简单或内置的方法可以仅在 Control 上立即右键单击显示上下文菜单?