How can I bind ctrl+1 to select the first tab in Visual Studio 2010?
If you are unsure of what I mean, try having multiple tabs open in Google Chrome and try ctrl+1,2,3 to switch between them.
I also have ReSharper - if that helps.
Explore on Visual Studio Extension " Productivity Power Tool ", it already has this kind of tab navigation.
http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/
With ReSharper. Open your first tab, click anywhere in the text and press Ctrl+Shift+1 (or 2, 3, etc.) to place ReSharper's bookmark. Then you can open this tab and go to this bookmark by pressing Ctrl+1 (2, 3, etc) even if you have other tab open. Exactly as you want.
I know this is a late response but I did this in a way without using an extension.
I created a menu item (if you're using WFA) and created tool strip menu items named like: tab0ToolStripMenuItem ect.
I set the menu item visible property to False
and each menu item to ShortcutKeys like Ctrl+1
Then tided the click events to:
private void tab0ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.tabControl1.SelectedIndex = 0;
}
private void tab1ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.tabControl1.SelectedIndex = 1;
}
private void tab2ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.tabControl1.SelectedIndex = 2;
}
private void tab3ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.tabControl1.SelectedIndex = 3;
}
Probably a poor and newbie way of doing this but it works, I hope this helps you or anyone else looking to this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.