Changes

Jump to: navigation, search

Designing Forms in Visual Studio

14 bytes added, 18:19, 20 July 2007
Anchoring and Autosizing
In addition to changing the size and layout of a group of controls it is also possible to set properties simultaneously on the group. When multiple controls are selected as a group the Visual Studio ''Properties'' panel changes to list only the properties which are common to all the control types comprising the group. Changing a property value in the properties panel applies that change to all selected controls.
== Anchoring and Autosizing Form Controls ==
All the controls we have worked with so far have been a fixed size. They have also remained that same size, even if the form in which they reside is resized. It is often useful to have a control resize when the form is resized. This is achieved using the ''Anchor'' property. To use this property, select a control in a form and click on the down arrow in the value field of the ''Anchor'' property in the Properties panel. A graphic will be displayed indicating the anchors currently set (typically the top and left edges of the control). Activate the anchors on the right and bottom edges of the control to anchor those sides:

Navigation menu