Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


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

3.3. USING DOCK PROPERTIES

The Anchor property can handle most of your arranging needs but some combinations of Anchor values are so common that Visual C# provides another property to let you handle these situations more easily: Dock. The Dock property lets you tell a control to attach itself to one of the edges of its container.

For example, a menu typically attaches to the top of a form and resizes horizontally to fill the form when the form resizes. You could provide that behavior by setting the menu's Anchor property to Top, Left, Right, but setting Dock to Top is even easier.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial