Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show control hierarchy in the WinForms designer

One of our clients has an old WinForms application that contains forms with a lot of controls on them. Some of those controls have a deep hierarchy and that makes it to hard to select them in the designer.

I need to understand this hierarchy to make modifications to the application to correct some bugs. Is there a way to see this hierarchy clearly? For example, is there something available that is similar to what can be seen in an .aspx source file when you have a breadcrumb of where you are in the HTML hierarchy (HTML > Body > div > etc.)? Or something more visual maybe?

like image 625
Cédric V Avatar asked Jun 09 '10 09:06

Cédric V


People also ask

How do you put controls on a form?

Add the control by drawingSelect the control by clicking on it. In your form, drag-select a region. The control will be placed to fit the size of the region you selected.

What is user control in Winforms?

A UserControl is a collection of controls placed together to be used in a certain way. For example you can place a GroupBox that contains Textbox's, Checkboxes, etc. This is useful when you have to place the same group of controls on/in multiple forms or tabs.


2 Answers

You need to use the Document Outline

View > Other Windows > Document Outline 

Or via hotkey

Ctl + ALT + T 
like image 103
codingbadger Avatar answered Sep 20 '22 18:09

codingbadger


Click on View > Other Windows > Document Outline in Visual Studio.

That should show the control hierarchy.

like image 20
anonymous Avatar answered Sep 22 '22 18:09

anonymous