Silverlight 4 in Action
Silverlight 4, ViewModel Pattern, and WCF RIA Services
Pete Brown
Revised edition of Silverlight 2 in Action by Chad Campbell and John Stockton
  • October 2010
  • ISBN 9781935182375
  • 800 pages

Goes deeply into why Silverlight works the way it does, not just step by step explanations. Pete Brown is the only guy who could have written this book.

Al Pascual, ERSI

Silverlight 4 in Action is a comprehensive guide to application building using C#. It goes into action immediately in a thorough introduction. It then follows up with numerous nifty examples to explore flexible layout, control extensibility, the communication and binding models, rich media, animation, and much more.

About the Technology

Silverlight gives you entirely new ways to create rich internet applications, and now Silverlight 4 adds many powerful enhancements to the mix.

Table of Contents detailed table of contents



about this book

about the cover illustration

Part 1 Introducing Silverlight

1. Introducing Silverlight

1.1. Silverlight and the web

1.2. Silverlight and WPF

1.3. Types of Silverlight applications

1.4. What’s new since the first edition

1.5. Getting started with Silverlight development

1.6. Building your first Silverlight web application

1.7. Summary

2. Core XAML

2.1. XAML basics

2.2. Object trees and namescope

2.3. XAML extensions and type converters

2.4. Loading XAML at runtime

2.5. Tools for working in XAML

2.6. Summary

3. The application model and the plug-in

3.1. The Silverlight application model

3.2. Creating the Silverlight plug-in

3.3. Integrating the Silverlight plug-in

3.4. Summary

4. Integrating with the browser

4.1. Silverlight and the HTML DOM

4.2. Managing the web page from managed code

4.3. Working with the user’s browser window

4.4. Bridging the scripting and managed code worlds

4.5. Hosting HTML in Silverlight

4.6. Summary

5. Integrating with the desktop

5.1. Silverlight out of the browser

5.2. Creating out-of-browser applications

5.3. Escaping the sandbox—elevated trust

5.4. Local file access

5.5. COM automation

5.6. Controlling the host window

5.7. Running in full screen

5.8. Storing data in isolated storage

5.9. Summary

6. Rendering, layout, and transforming

6.1. The UIElement and FrameworkElement

6.2. The rendering process

6.3. The layout system

6.4. Render transforms

6.5. 3D projection transforms

6.6. Summary

7. Panels

7.1. Canvas 172 n Arranging content of a Canvas

7.2. The StackPanel

7.3. The Grid

7.4. Summary

8. Human input

8.1. Capturing the keyboard

8.2. Mouse input

8.3. Using multi-touch

8.4. Collecting ink drawings

8.5. Summary

9. Text

9.1. The text system

9.2. Displaying text

9.3. Embedding fonts

9.4. Entering and editing text

9.5. Entering and displaying rich text

9.6. Summary

10. Controls and UserControls

10.1. Control

10.2. ContentControl

10.3. Button controls

10.4. ItemsControls

10.5. Creating UserControls

10.6. Summary

Part 2 Structuring your application

11. Binding

11.1. Binding with your data

11.2. Understanding your binding source

11.3. Customizing the display

11.4. Creating data templates

11.5. Summary

12. Data controls: DataGrid and DataForm

12.1. The DataGrid

12.2. The DataForm

12.3. Annotating for display

12.4. Summary

13. Input validation

13.1. The validation example source and UI

13.2. Exception-based property validation

13.3. Synchronous validation with IDataErrorInfo

13.4. Asynchronous validation with INotifyDataErrorInfo

13.5. Annotating for validation

13.6. Comparison of validation approaches

13.7. Summary

14. Networking and communications

14.1. Trust, security, and browser limitations

14.2. Connecting to data sources

14.3. The client HTTP stack

14.4. Making the data usable

14.5. Using advanced services

14.6. Connecting to other Silverlight applications

14.7. Summary

15. Navigation and dialogs

15.1. Browser navigation background

15.2. The Navigation Application template

15.3. Navigating to pages

15.4. Navigation out of the browser

15.5. Showing dialogs and pop-ups

15.6. Summary

16. Structuring and testing with the MVVM/ViewModel pattern

16.1. Project setup and traditional code-behind approach

16.2. Model-View-ViewModel basics

16.3. Factoring out reusable code

16.4. Better separation from the UI

16.5. Testing

16.6. Summary

17. WCF RIA Services

17.1. WCF RIA Services architecture, tooling, and template

17.2. Exposing data with the domain service

17.3. Filtering, sorting, grouping, and paging

17.4. Updating data

17.5. Loose coupling: using presentation models

17.6. Business logic

17.7. Authentication and authorization

17.8. Summary

Part 3 Completing the experience

18. Graphics and effects

18.1. Shapes

18.2. Geometry

18.3. Brushes

18.4. Effects

18.5. Summary

19. Printing

19.1. How Silverlight printing works

19.2. Printing onscreen Information

19.3. Multipage printing dedicated trees

19.4. Summary

20. Displaying and capturing media

20.1. Audio and video

20.2. Playlists

20.3. Interactive playback

20.4. Using protected content

20.5. Using the Silverlight Media Framework

20.6. Working with raw media

20.7. Using the webcam

20.8. Summary

21. Working with bitmap images

21.1. Basic imaging

21.2. Creating images at runtime

21.3. Deep Zoom

21.4. Dealing with dead space

21.5. Summary

22. Animation and behaviors

22.1. Animation: it’s about time

22.2. Mastering the timeline

22.3. Storyboarding

22.4. Keyframing

22.5. Easing functions

22.6. Behaviors, triggers, and actions

22.7. Summary

23. Resources, styles, and control templates

23.1. Being resourceful

23.2. Giving your elements style

23.3. Creating templates

23.4. Dealing with visual states

23.5. Sharing your visual states

23.6. Summary

24. Creating panels and controls

24.1. Creating a custom panel

24.2. Creating a custom control

24.3. Summary

25. The install experience and preloaders

25.1. Handling the "Silverlight not installed" scenarios

25.2. Using a custom preloader

25.3. Summary

Appendix A: Database, connection, and data model setup


What's inside

  • Comprehensive and deep
  • Author an authority
  • Effective UI design with MVVM
  • Building with WCF RIA Services
  • Out-of-browser, COM and Custom Chrome

About the reader

This book explores practical questions in patterns, testing, and performance optimization throughout. No previous experience with Silverlight is required.

About the author

Pete Brown is the Microsoft Community Program Manager for Silverlight and WPF. The First Edition was written by independent developers Chad Campbell and John Stockton.

First Edition Authors

Chad Campbell is a Microsoft MVP and solutions architect. He has been developing enterprise-level web applications with a wide variety of technologies since 1999. He holds MCSD and MCTS certifications and holds BS degree from Purdue University.

John Stockton is a web applications developer and is active in the Silverlight community, speaking at and organizing live and online events.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks