Chapter 7. Rendering, layout, and transforming

 

This chapter covers

  • UI elements and framework elements
  • The layout system
  • The rendering pipeline
  • 2D and 3D transformations

In the past few chapters, I covered some fairly big-picture topics, such as how to have Silverlight work in and out of the browser, how to use elevated trust, and how to use XAML. Those are all important to understand in order to create Silverlight applications. XAML and the property system are also important, and you’ll build upon that knowledge in every subsequent chapter, including this one.

This chapter focuses on fundamentals of the core UI base classes and the rendering and layout systems that make everything fit on the screen and render to the user. Silverlight’s rendering process involves a number of steps and has provisions for several developer-provided optimizations to the process. Silverlight also has a far more advanced layout system than simple left/top positioning of elements on the screen. The multipass layout system handles measuring and arranging elements across the entire visual tree.

Once you have the rendering, layout, and core object fundamentals down, you’ll have fun with performing 2D transformations on your objects. If you’ve ever wanted to rotate or scale an object on the screen, you’ll find the section on render transformations to your liking.

7.1. The UIElement and FrameworkElement

7.2. The rendering process

7.3. The layout system

7.4. Render transforms

7.5. 3D projection transforms

7.6. Summary