Visual Studio 2012 的导航按钮如何工作? [英] How do Visual Studio 2012's navigation buttons behave?

查看:36
本文介绍了Visual Studio 2012 的导航按钮如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Visual Studio 2012 的 IDE 中,我注意到现在有前进和后退导航按钮,类似于 Web 浏览器.

In Visual Studio 2012's IDE, I've noticed that there are now forward and backward navigation buttons, analogous to a web browser.

在解决方案资源管理器中,这些按钮似乎允许您在搜索之间来回导航.请参阅 这篇文章了解更多详情.

Within Solution Explorer, it seems these buttons allow you to navigate back and forth between searches. See this article for more details.

但是,这些导航按钮也存在于 IDE 主菜单正下方的工具栏中.使用这些按钮似乎可以控制激活哪些文档窗口,但我找不到解释它们确切行为的博客文章.

However, these navigation buttons also exist in the Toolbar directly beneath the IDE's main menu. Playing with these buttons seems to control which document windows are activated, but I can't find a blog post that explains their exact behavior.

是否有博客文章或在线规范准确描述了这些导航按钮的作用?

Is there a blog post or online spec that describes exactly what these navigation buttons do?

推荐答案

标准工具栏中的前进/后退"按钮可让您导航到导航堆栈中的先前位置,无论它们是否如您提到的位于不同的文档中.

The Navigate Forward/Backward buttons in the standard toolbar let you navigate to previous locations in your navigation stack, whether or not they are in different documents as you mentioned.

例如,您可能正在查看调用另一个方法bar"的某个方法foo",然后按 F12 以查看bar"内部发生的情况.当您这样做时,光标所在的foo"中的位置将被推送到导航堆栈上,当您按下向后导航"按钮时,您将返回foo",正是您离开的位置.

For example, you may be looking at some method "foo" which calls another method "bar" and you press F12 to see what's happening inside "bar". When you do so, the location in "foo" where your cursor was is pushed onto the navigation stack and when you press the Navigate Backward button, you are back in "foo", exactly where you left off.

添加导航堆栈的其他情况示例是(来自下面链接的博客文章):

Other examples of situations in which the navigation stack is added to are (from the blog post linked below):

  • 增量搜索(包括反向搜索)在搜索开始时留下一个返回标记,在搜索结束时留下另一个标记.
  • 将光标从当前位置移动 10 多行(即 11 行或更多)的 GoToLine 或鼠标单击会在新位置放置一个返回标记位置.
  • 破坏性操作(将光标移动到新位置后)会放置返回标记
  • 执行查找 (Ctrl+F) 在找到的位置放置一个返回标记
  • 打开文件会在光标位于旧文件的任何位置放置一个返回标记,并在打开的文件上放置另一个.

此外,值得一提的是,这些按钮具有键盘快捷键 (Ctrl + -) 和 (Ctrl + Shift + -).

Also, it's worth knowing that the buttons have keyboard shortcuts (Ctrl + -) and (Ctrl + Shift + -).

有关更多信息,请参阅此博文.

For more information, see this blog post.

这篇关于Visual Studio 2012 的导航按钮如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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