Reputation: 6425
I'm working with a legacy VB.NET, Windows Forms application in Visual Studio that has dialogs with several buttons.
I can't find the specific button I'm looking for on the designer canvas.
Is there a shortcut that lets you search for a button on the designer canvas by name?
Upvotes: 3
Views: 4157
Reputation: 31
Since personally I didn't understand what people were talking about at first,
Here's a quick gif of what to do:
https://i.sstatic.net/HnfvN.gif
Upvotes: -1
Reputation: 29889
Use Document Outline which will show you every object on the Form and automatically locate it wherever it is.
Go to View > Other Windows > Document Outline or Ctrl + Alt + T
Navigate the Tree and find the Object you want
Upvotes: 0
Reputation: 8938
You can use Visual Studio's Properties Window in design view to choose controls on the form by name:
If your Properties Window is not displayed already, you can open it through the View menu (View > Properties Window) or by pressing F4. The above screenshot is from VS 2013; but the Properties Window has been in VS for many versions.
You can also tab through controls in design view by selecting one
then pressing Tab to shift focus to the next one
and pressing it again to advance to the next one
etcetera.
This is not a shortcut to locate a control on the design canvas by name per se; but it is handy for the situation you describe; and you will notice that the current-control name in the Properties Window changes with the shift in focus each time you press Tab (which does more specifically fit your desire to find a control by name).
Upvotes: 3