Layout
All applications need to present information to users. For this
information to be conveyed effectively, it should be arranged onscreen in a
clear and logical way. WPF provides a powerful and flexible array of tools for
controlling the layout of the user interface.
There is a fine line between giving the developer or designer
enough control over the user interface's layout, and leaving them to do all the
work. A good layout system should be able to automate common scenarios such as
resizing, scaling, and adaptation to localization but should allow manual
intervention where necessary.
WPF provides a set of panels
: elements that handle layout. Each individual panel type offers a
straightforward and easily understood layout mechanism. As with all WPF
elements, layout objects can be composed in any number of different ways, so
while each individual element type is fairly simple, the flexible way in which
they can be combined makes for a very powerful layout system. And you can even
create your own layout element types should the built-in ones not meet your
needs.
In this chapter, we will look at where each of the basic layout
panels fits into a typical UI design. We will also examine some of the
text-layout features of WPF.
 |