O'Reilly logo

Professional Silverlight® 4 by Bill Evjen, Jason Beres, Devin Rader

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Controlling Layout with Panels

WHAT'S IN THIS CHAPTER?

  • Measuring and arranging

  • Sizing elements

  • Using and making layout panels

Controlling the layout of an application's user interface (UI) is a problem that has long plagued developers. Over the years, rich-client developers have written thousands of lines of code solely devoted to reposition UI elements in the application as its window size changes. Web developers have long struggled with the multitude of positioning schemes available to them, starting with HTML tables and progressing to CSS layout, and — adding insult to injury — dealing with different browser interpretations of these layout schemes.

Microsoft looked to address many of the basic problems in application user interface layout with Windows Presentation Foundation (WPF) by creating a powerful, flexible, and highly extensible new layout system. Thankfully, they have brought most of those layout concepts into the world of Silverlight. Through the use of layout containers and panels, the Silverlight layout system gives you a level of layout control that was previously difficult, if not impossible, to achieve.

In this chapter, you first learn the basics of the Silverlight layout system and how it works to create flexible application user interfaces, and ways that you can influence how individual UI elements are sized and positioned. Next, you will learn about the different layout panels included in Silverlight that implement these layout concepts. You also learn how ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required