Prev | Current Page 185 | Next

Matthew MacDonald

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


For example, anchoring and docking couldn??™t implement bi-pane proportional resizing
(dividing extra space equally among two regions). They also weren??™t much help if you had
highly dynamic content, such as a label that might expand to hold more text than anticipated,
causing it to overlap other nearby controls.
In .NET 2.0, Windows Forms filled the gaps with two new layout containers: the
FlowLayoutPanel and TableLayoutPanel. Using these controls, you could create more sophisticated
web-like interfaces. Both layout containers allowed their contained controls to grow and
bump other controls out of the way. This made it easier to deal with dynamic content, create
modular interfaces, and localize your application. However, the layout panels still felt like an
77
C H A P T E R 4
78 CHAPTER 4 n LAYOUT
add-on to the core Windows Forms layout system, which used fixed coordinates. The layout
panels were an elegant solution, but you could see the duct tape holding it all together.
WPF introduces a new layout system that??™s heavily influenced by the developments in
Windows Forms. This system reverses the .NET 2.0 model (coordinate-based layout with
optional flow-based layout panels) by making flow-based layout the standard and giving only
rudimentary support for coordinate-based layout. The benefits of this shift are enormous.


Pages:
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197