如何从“编辑"菜单中删除“删除"命令(已选择项目节点)? [英] How to Delete Command “Remove” from Edit Menu (Project Node selected)?

查看:133
本文介绍了如何从“编辑"菜单中删除“删除"命令(已选择项目节点)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

 

如何删除该命令 从编辑"菜单删除 已选择项目节点?

 

我尝试了一些注释 IsolatedShellUI.vsct 文件中的< Define name =" No _... Command"/> 行,但未成功.

 

环境:Visual Studio 2008 SDK1.1

 

最好的问候,赫尔根(Hergen)

 

 

解决方案

Hergen,

删除"和删除"命令的命令可见性通过项目层次结构的 IVsHierarchyDeleteHandler.QueryDeleteItem .如果偶然您有一个基于MPF项目源的项目类型,则需要通过HierarchyNode.QueryDeleteItem进行处理. 方法.如果要隐藏/显示特定节点类型上的任何一个,则可能是单个节点类型(例如FileNode.CanDeleteItem)上的CanDeleteItem.

此致


Hello,

 

how can I delete the command “Remove” from the Edit menu when the Project 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 of IVsHierarchyDeleteHandler.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,


这篇关于如何从“编辑"菜单中删除“删除"命令(已选择项目节点)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆