All you need to do is wrap all the contents
of that pane in some sort of layout container and set its Visibility property to suit. The remaining
content will be rearranged to fit the available space.
The Last Word
In this chapter, you took a detailed tour of the new WPF layout model and learned how to
place elements in stacks, grids, and other arrangements. You built more complex layouts using
nested combinations of the layout containers, and you threw the GridSplitter into the mix to
make resizable split windows. And all along, you kept close focus on the reasons for this dramatic
change??”namely, the benefits you??™ll get when maintaining, enhancing, and localizing
your user interface.
The layout story is still far from over. In the following chapters, you??™ll see many more
examples that use the layout containers to organize groups of elements. You??™ll also learn about
a few additional features that let you arrange content in a window:
??? Specialized containers. The Border, ScrollViewer, and Expander give you the ability to
create content that has borders, can be scrolled, and can be collapsed out of sight.
Unlike the layout panels, these containers can only hold a single piece of content. However,
you can easily use them in concert with a layout panel to get exactly the effect you
need.
Pages:
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256