VS2010中自定义工具栏项

发布于 2024-08-30 02:40:33 字数 156 浏览 3 评论 0原文

有菜单和VS2010中工具栏自定义功能被减少了?

我似乎无法为添加的命令选择图标,也无法将其设置为仅图标。早期版本的 Visual Studio 支持此功能,甚至允许创建/编辑自定义图标。

这是由于迁移到 WPF 编写的 UI 而受到影响的结果还是我遗漏了某些内容?

Has the menu & toolbar customization functionality in VS2010 been reduced?

I can't seem to be able to select an icon for an added command, nor set it to be icon-only. Previous versions of Visual Studio supported this functionality and even allowed the creation/editing of custom icons.

Is this something that has suffered as a result of the move to the WPF-authored UI or am I missing something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

说不完的你爱 2024-09-06 02:40:33

似乎此功能已从 Visual Studio 2010 中删除。这篇文章的评论中有一些信息: 自定义 Visual Studio 2010

具体来说 - “不幸的是,在 VS2010 中无法通过“自定义”对话框为命令分配或编辑图标,这是被删除的功能之一。不过,我们会考虑在下一个版本中添加回来。”

该回复还对解决方法进行了较长的解释。

Seems like this functionality was cut from Visual Studio 2010. This post has some info in the comments: Customizing Visual Studio 2010

Specifically - "Unfortunately assigning or editing icons to commands through Customize dialog is not possible in VS2010. It is one of the features got cut for lack of time. This is however something we'll consider adding back in next version."

The reply also has a longer explanation of a workaround.

却一份温柔 2024-09-06 02:40:33

链接中所述 @Gordon Mackie JoanMiro 的回答中提到,功能减少的原因是 VS Shell 团队将整个 UI(shell 和命令系统)从 Win32 迁移到仅基于 WPF 的 UI。我想这是一项艰巨的任务。不过,现在有几个解决方法可用:

  1. 您可以从 VS 2008 中导出以前保存的设置并将其导入到 VS 2010 中。其中包括命令栏自定义(如@Don 所述)
  2. A 更新的博客文章 包含使用 VS2010 新扩展的详细说明(可在 Visual Studio Gallery 上找到)用户更改命令 UI 上的图像。 (请注意,此新扩展仍然不支持旧的拖放自定义界面。)

As noted in the link mentioned in the answer from @Gordon Mackie JoanMiro, the REASON for the reduced functionality is that the VS Shell team migrated the entire UI (shell and command system) from Win32 to one based solely on WPF. This was a gargantuan task, I would imagine. However, a couple workarounds are now available:

  1. You can export previously saved settings from VS 2008 and import them into VS 2010. That includes command bar customizations (as noted by @Don)
  2. A more recent blog-post contains detailed instructions for using a new extension to VS2010 (available on Visual Studio Gallery) that allows users to change the images on the command UI. (Note that the old drag&drop customization interface is still not supported in this new extension.)
固执像三岁 2024-09-06 02:40:33

如果您有自定义图标,则在重新启动 VS2010 时,对工具栏进行任何更改的任何尝试都将导致自定义图标消失并被文本替换。

我发现将没有文本的自定义图标导入 VS2010 的唯一方法是打开 VS2008,按照我想要的方式设置所有工具栏,包括自定义图标,然后导出设置(工具|导入和导出设置)。然后打开VS2010并导入这些设置。我知道这很乏味,但它允许我有一个向下箭头图标来搜索光标所在单词的下一个实例。

If you have custom icons, any attempt to make ANY changes to the tool bar will result in the custom icons disappearing and being replaced by text when you restart VS2010.

The only way I found to get my custom icons without text into VS2010 is to open VS2008, set up all of the tool bars the way I want, including custom icons, then export the settings (Tools| Import and Export Settings). Then open VS2010 and import those settings. Tedious, I know, but it allows me to have a down arrow icon that searches for the next instance of the word my cursor is on.

温暖的光 2024-09-06 02:40:33

我一直在尝试自定义 VS2010 工具栏/键盘,在以前的版本中需要几分钟的工作现在需要几个小时。新系统看起来很漂亮,但在实践中却毫无用处。除了您无法做的事情(例如如上所述更改按钮的外观)之外,您可以做的事情非常耗时且烦人。

为什么 VS 的每个新版本都会失去一些真正有用的东西?其他示例:

  1. VC++5 引入了新的 HTML 帮助系统。在函数名称上按 F1 可立即显示该函数的帮助。 VC++5 获取上下文帮助变得令人烦恼地慢得多,而且仍然非常慢(而且不准确)。

  2. 与 VC++6 相比,VS.Net(又名 VS2002 或 VC++7)的书签系统毫无用处。 VS2010 的书签更好,但并不完美。

  3. VS.Net 删除了搜索状态按钮“整个单词”、“区分大小写”等。这些可能是有史以来最有用的按钮,因为它们可以让您快速了解搜索失败的原因。

I have been trying to customize VS2010 toolbars/keyboard and what took a few minutes in previous versions takes hours now. The new system looks real pretty but is useless in practice. Apart from the fact you just can't do (like change the appearance of buttons as mentioned above) the things you can do are extremely time-consuming and annoying.

Why is it every new version of VS loses something really useful? Other examples:

  1. VC++5 introduced a new HTML help system. Pressing F1 on a function name used to immediately show help for that function. After VC++5 getting context help became annoyingly much slower, and is still very slow (and inaccurate).

  2. VS.Net (aka VS2002 or VC++7) had a useless bookmark system compared to VC++6. VS2010 bookmarks are better but not perfect.

  3. VS.Net removed the search state buttons "whole word", "case sensitive" etc. These were possibly the most useful buttons ever as they quickly allowed you to see why a search may have failed.

北陌 2024-09-06 02:40:33

我发现了一个很棒的扩展: CommandingImage

它没有图标编辑器,但您可以将图像创建为 16x16 png 格式(为了透明度)并导入它(我推荐 Paint.Net)

I found a great extension: CommandingImage

It does not have an icon editor, but you can create your images as 16x16 png format (for transparency) and import it (I recommend Paint.Net)

痴梦一场 2024-09-06 02:40:33

戴夫,添加工具栏按钮的方法如下:
1) 在 IDE 中,找到工具栏最右侧的向下箭头,然后单击“添加删除按钮”、“自定义”
2) 在“自定义”窗口中选择“菜单栏”单选按钮,然后选择要添加按钮的相应菜单栏
3)单击“添加命令...”按钮
4) 选择要添加的适当类别和命令按钮,然后单击“确定”。

您选择的命令按钮将添加到您选择的菜单栏中。您可以向上或向下移动按钮。

我想这就是您正在寻找的。

祝你好运!

Dave, here's how to add toolbar buttons:
1) in the IDE, find the down arrow looking thing on the far right of a toolbar and click on Add Remove Buttons, Customize
2) in the Customize window select the Menu Bar radio button then select the appropriate menu bar that you want to add a button to
3) click the "Add Command..." button
4) select the appropriate Category and Command button that you want to add, then click OK.

The command button you selected will be added to the menu bar you selected. You can move the button up or down.

I think this is what you are looking for.

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文