最好的问候,赫尔根(Hergen) 解决方案 Hergen,删除"和删除"命令的命令可见性通过项目层次结构的 IVsHierarchyDeleteHandler.QueryDeleteItem .如果偶然您有一个基于MPF项目源的项目类型,则需要通过HierarchyNode.QueryDeleteItem进行处理. 方法.如果要隐藏/显示特定节点类型上的任何一个,则可能是单个节点类型(例如FileNode.CanDeleteItem)上的CanDeleteItem.此致Hello, how can I delete the command“Remove” from the Edit menu when theProject node is selected? I tried uncommenting some<Define name="No_...Command"/> lines in file IsolatedShellUI.vsct but was not successful. Environment: Visual Studio 2008 SDK 1. 1 Best regards, Hergen 解决方案 Hi Hergen,Command visibility for the Delete and Remove commands are handled via the project hierarchy's implementation ofIVsHierarchyDeleteHandler.QueryDeleteItem. If by chance you have a project type that is based on the MPF project sources, you'll want to handle this from the HierarchyNode.QueryDeleteItem method. Or possibly the CanDeleteItem on the individual node type (such as the FileNode.CanDeleteItem), if you want to hide/show either of these on a particular node type.Sincerely, 这篇关于如何从“编辑"菜单中删除“删除"命令(已选择项目节点)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-26 09:04