Prev | Current Page 241 | Next

Matthew MacDonald

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


Figure 4-21. A self-adjusting window
To make this work, the window is carved into a table with two columns and two rows. The
column on the left takes the resizable buttons, while the column on the right takes the text
box. The bottom row is used for the Close button. It??™s kept in the same table so that it resizes
along with the top row.
Here??™s the complete markup:












Checked="chkLongText_Checked" Unchecked="chkLongText_Unchecked">
Show Long Text

CHAPTER 4 n LAYOUT 114

TextWrapping="WrapWithOverflow" Grid.RowSpan="2">This is a test that demonstrates
how buttons adapt themselves to fit the content they contain when they aren't
explicitly sized. This behavior makes localization much easier.