Prev | Current Page 238 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"

The middle column gets all the
remaining room, which means it grows as the window is resized larger, giving you more room
to see the selected folder. (If you want this stretching to top out at some extremely wide maximum
value, you can use the MaxWidth property when defining the column, just as you do
with individual elements.)
...





...
CHAPTER 4 n LAYOUT 112
nTip The Grid needs some minimum space??”enough to fit the full label text, the browse button, and a few
pixels in the middle column to show the text box. If you shrink the containing window to be smaller than this,
some content will be cut off. As always, it makes sense to use the MinWidth and MinHeight properties on the
window to prevent this from occurring.
Now that you have your basic structure, you simply need to slot the elements into the
right cells. However, you also need to think carefully about margins and alignment. Each element
needs a basic margin (a good value is 3 units) to give some breathing room. In addition,
the label and text box need to be centered vertically because they aren??™t as tall as the Browse
button.


Pages:
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250