• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Displaying Forms > Anchoring and Docking Controls

Anchoring and Docking Controls

The .NET Framework adds two new concepts to the standard size and position of a widget: anchoring and docking. They come into play when the user resizes the form, and help you maintain the relationships you've established between your controls. With these two new techniques, the vast majority of the tedious resizing code you used to write simply disappears.

Anchoring controls the distance between the control and one or more edges of its container. By default, controls in Visual Studio are anchored to the Top and Left edges of their container. As shown in Figure 10-3, this default configuration means that the distance between those two edges will stay the same no matter what the size of the form.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint