Skip to main content

Professional Silverlight 4

Professional Silverlight 4

Jason Beres, Bill Evjen, Devin Rader

ISBN: 978-0-470-93496-8

Jul 2010

840 pages

Select type: E-Book

Product not available for purchase

Description

Everything .NET developers need to take advantage of Silverlight 4

Silverlight 4 is a major new release of Microsoft's flagship product for building rich, interactive applications that combine animation, graphics, audio, and video. This book, by seasoned Wrox authors and Silverlight experts, gives professional Web developers all the tools necessary to build RIAs using the new Silverlight capabilities. You will gain a complete, thorough understanding of both core and advanced platform concepts, with examples in C#.

Professional Silverlight 4 prepares Web developers to take full advantage of the newest release of the most popular platform for developing rich interactive applications.

Coverage Includes:

  • Introduction to Silverlight
  • Building Applications with Visual Studio
  • Building Applications with Expression Blend 4
  • Working with the Navigation Framework
  • Controlling Layout with Panels
  • Working with Visual Controls
  • Accessing Data
  • WCF RIA Services
  • Out-of-Browser Experiences
  • Networking Applications
  • Building Line of Business Applications
  • Application Architecture
  • DOM Interaction
  • Securing Your Applications
  • Accessing Audio and Video Devices
  • Working with File I/O
  • Using Graphics and Visuals
  • Working with Animations in Silverlight
  • Working with Text
  • Making It Richer with Media
  • Styling and Themes

Introduction xxv

Chapter 1: Introduction to Silverlight 1

What Is Silverlight? 2

Silverlight Versions Explained 5

Application Development Scenarios 6

Getting the Silverlight Plug-In 8

Getting the Silverlight SDK 11

Building Silverlight Applications 12

Silverlight 4 Tour 12

Chapter 2: Building Applications with Visual Studio 31

Creating a Basic Silverlight Application 31

Understanding the Application Life Cycle 55

Debugging Silverlight Applications 57

Configuring Silverlight MIME Types 61

Summary 62

Chapter 3: Building Applications with Expression Blend 4 63

Learning Expression Blend Basics 64

Using Expression Blend Behaviors 78

Using the Visual State Manager 81

Importing Design Assets 83

Using the Expression Suite 86

Summary 91

Chapter 4: Working with the Navigation Framework 93

Using the Navigation Template 93

Creating Parameterized Query Strings 99

Using a Custom Menu Control 111

Adding Navigation Animations 113

Summary 115

Chapter 5: Controlling Layout with Panels 117

Measure, Then Arrange 118

Element Sizing Characteristics 120

Using Layout Panels 125

Creating Custom Panels 133

Silverlight Plug-In Sizing 137

Summary 138

Chapter 6: Working with Visual Controls 139

Where to Find Controls 140

Using Text Display Controls 142

Using Input Editor Controls 144

Using Lists and Items Controls 154

Using Button Controls 175

Using the GridSplitter Control 178

Using the Image Control 179

Using Data Visualization Controls 180

Using Other Miscellaneous Controls 189

Creating Custom Controls 195

Summary 203

Chapter 7: Accessing Data 205

Processing XML Data 205

Binding a User Interface to Data 209

Working with Services 225

Summary 255

Chapter 8: WCF RIA Services 257

Understanding WCF RIA Services 258

Building a Simple RIA Services Application 259

Summary 280

Chapter 9: Out-of-Browser Experiences 281

Creating an Out-of-Browser Application 281

Installing Trusted Applications 292

Installing a Local Silverlight Application 300

Summary 300

Chapter 10: Networking Applications 301

The WebClient Class 302

Silverlight and WCF Duplex Communications 314

Sockets 323

Summary 336

Chapter 11: Building Line of Business Applications 337

Line of Business Basics 337

Advanced Scenarios 351

Globalization and Localization 366

Full-Screen Applications 371

Summary 373

Chapter 12: Application Architecture 375

Understanding Design Patterns 376

Using Silverlight Frameworks 396

Defining Your Data Access Strategy 424

Handling Performance 427

Summary 428

Chapter 13: DOM Interaction 429

Configuring the Silverlight Plug-In 429

Creating Interaction between Silverlight and JavaScript 438

Summary 446

Chapter 14: Securing Your Applications 449

Taking Advantage of ASP.NET 450

Using ASP.NET Application Services 461

Summary 477

Chapter 15: Accessing Audio and Video Devices 479

Configuring Permissions 479

Accessing Audio and Video Devices 481

Capturing Images from a Video Feed 488

Capturing an Audio Stream 494

Summary 495

Chapter 16: Working with File I/O 497

The OpenFileDialog and SaveFileDialog Classes 497

Classes for Managing the Filesystem 500

Moving, Copying, and Deleting Files 514

Reading and Writing Files 517

Using Streams 523

Using Isolated Storage Options 532

Summary 539

Chapter 17: Using Graphics and Visuals 541

The Basics 541

Expression Blend Shapes 552

Images and Media 554

Brushes 560

Fonts and Font Embedding 570

Effects 572

Transforms 581

Summary 590

Chapter 18: Working with Animations in Silverlight 591

Storyboard Animations 592

Keyframe Animation 603

Summary 611

Chapter 19: Working with Text 613

Displaying and Inputting Text 613

Font Support and Rendering 634

Summary 639

Chapter 20: Making It Richer with Media 641

Supported Formats 641

Unsupported Windows Media Formats 643

H.264 and AAC Support 643

Digital Rights Management 644

Using the MediaElement Control 644

Media Playlists 667

Summary 679

Chapter 21: Styling and Themes 681

Getting Started 682

Defining Local Styling (Inline Styling) 683

Styling with Resources 684

Working with the Style Object 688

Defining and Using Implicit Styles 706

Defining and Organizing Resources 707

Using Themes 712

Editing Styles and Templates in Expression Blend 716

Summary 721

Appendix A: XAML Primer 723

Introducing XAML 723

Silverlight XAML Basics 724

Declaring Objects in XAML 726

XAML Hierarchy 730

Events and the Silverlight Control 731

Markup Extensions 736

Summary 739

Appendix B: Testing Silverlight Applications 741

Creating the Sample Application 741

Using the Silverlight Unit Test Framework 743

Using the Selenium Test Framework 748

Automated UI Testing Using White 751

Mocking Frameworks 755

Summary 755

Appendix C: Building Facebook Applications with Silverlight 757

Creating a New Application on Facebook 757

Using the Facebook Developer Toolkit 760

Summary 773

Appendix D: Integrating Silverlight into SharePoint 2010 775

The Sample Application 775

Using the SharePoint Foundation 2010 Silverlight Object Model 776

Deploying a Silverlight Application into SharePoint 780

Summary 781

Appendix E: Silverlight Control Assemblies 783

Index 787

Read Me file
Download
Chapter 3 code
Download
Chapter 4 code
Download
Chapter 5 code
Download
Chapter 6 code
Download
Chapter 7 code
Download
Chapter 8 code
Download
Chapter 9 code
Download
Chapter 10 code
Download
Chapter 11 code
Download
Chapter 12 code
Download
Chapter 13 code
Download
Chapter 14 code
Download
Chapter 15 code
Download
Chapter 16 code
Download
Chapter 17 code
Download
Chapter 18 code
Download
Chapter 19 code
Download
Chapter 20 code
Download
Chapter 21 code
Download
Appendix B code
Download
Appendix C code
Download
Appendix D code
Download
All chapters combined code download
Download
ChapterPageDetailsDatePrint Run
379Error in Text
The paragraph that currently reads:

To get the library, you must add a reference to the System.Windows.Interactivity.dll that comes with Expression Blend. This will not show with the other libraries in Visual Studio, so when you right-click and select ?Add Reference,? you need then to click the Browse tab. You will find the DLL in the Programs folder normally on your C drive under Microsoft SDKs, then under the Expression folder, the Blend folder, then ../Interactivity/Libraries/Silverlight/. Once the DLL is included, you are ready to build out the class you created into a Blend Behavior. You need to start by adding the namespace at the top like this:

Should read as follows:

To get the base class (and the associated namespace), you must add a reference to the System.Windows.Interactivity namespace that comes with the Silverlight 4 framework. Right-click on references, select ?Add Reference,? and select System.Windows.Interactivity from the .NET list of libraries. Once the namespace is included, you are ready to build out the class you created into a Blend Behavior. You need to start by adding the namespace at the top like this:

07/23/2010