The ViewBox Panel

The ViewBox panel allows adapting nested controls to its size, including the content of controls. For example, consider the following code:

image

You immediately notice how the button’s text is expanded to best fit the button size. This also happens if you decrease or increase the window size, as demonstrated in Figure 31.19.

Figure 31.19 The ViewBox panel in action.

image

In a few words, the ViewBox allows resizing controls and their content.

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.