Prev | Current Page 263 | Next

Matthew MacDonald

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

Here??™s the markup
that creates the example shown in Figure 5-10:






Lorem ipsum dolor sit amet, consectetuer adipiscing elit ...






CHAPTER 5 n CONTENT 132
You can also choose which direction the expander ???expands??? in. In Figure 5-10, the standard
value (Down) is used, but you can also set the ExpandDirection property to Up, Left, or
Right. When the Expander is collapsed, the arrow always points in the direction where it will
expand.
Life gets a little interesting when using different ExpandDirection values because the
effect on the rest of your user interface depends on the type of container. Some containers,
such as the WrapPanel, simply bump other elements out of the way. Others, such as Grid, have
the option of using proportional or automatic sizing. Figure 5-11 shows an example with a
four-cell grid in various degrees of expansion. In each cell is an Expander with a different
ExpandDirection. The columns are sized proportionately, which forces the text in the
Expander to wrap.


Pages:
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275