E-Book, Englisch, 1056 Seiten
Ghosh / Cameron Silverlight Recipes
2. ed
ISBN: 978-1-4302-3034-2
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
A Problem-Solution Approach
E-Book, Englisch, 1056 Seiten
ISBN: 978-1-4302-3034-2
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Silverlight Recipes: A Problem-Solution Approach, Second Edition is your practical companion to developing rich, interactive web applications with Microsoft's latest technology. This book tackles common problems and scenarios that on-the-job developers face every day by revealing code and detailed solutions. You'll quickly be able to integrate real-world, functioning code into your applications-and save hours of coding time. The recipes included in Silverlight Recipes have been carefully selected and tested with the professional developer in mind. You'll find problems stated clearly and succinctly, artful solutions explored, and ample discussion of the code and context so you're immediately clear how the solution will support your project. You'll also discover the innovations presented in Silverlight 4 and how to effectively employ them. Enjoy practical coverage of Silverlight development in many projects and contexts, including: Designing complete, rich, interactive user experiences Manipulating content and the runtime environment through the Silverlight Plug-in Runtime API Consuming, transforming, and displaying content in your Silverlight web application through XML, LINQ-based data access, and isolated storage Building custom controls for your Silverlight project Integrating rich media, including audio and video, to create a very dynamic user interface and experience Using new Silverlight features, including .NET Framework integration, the use of dynamic languages like Python and Ruby in Silverlight development, and digital rights management support Find instant solutions, comprehensive Silverlight coverage, and time-saving expert advice, all in one book.
Jit Ghosh is an industry architect with the Developer Platform Evangelism team at Microsoft, working on digital media solutions. Jit has over 16 years of solutions architecture and software engineering experience with the last few years focused on the broadcast, digital content publishing and advertising space. You can read more about Jit's current work at http://blogs.msdn.com/jitghosh.
Autoren/Hrsg.
Weitere Infos & Material
1;Contents at a Glance;5
2;Table of Contents;6
3;About the Authors;27
4;About the Technical Reviewers;28
5;Acknowledgments;29
6;Introduction;30
6.1;Who This Book Is For;30
6.2;How This Book Is Structured;31
6.3;Prerequisites;31
6.4;Downloading the Code;31
6.5;Contacting the Authors;31
7;CHAPTER 1 Quick Tour of Silverlight 4 Development;32
7.1;Getting Up to Speed with Silverlight;32
7.1.1;Silverlight 3 Highlights;34
7.1.1.1;Major Media Enhancements;35
7.1.1.2;Enhanced User Experience Rendering Capabilities;35
7.1.1.3;Rich Internet Applications and Line-of-Business Enhancements;35
7.1.1.4;WCF RIA Services Data Support Improvements;36
7.1.1.5;Browser Support;36
7.1.1.6;Out-of-Browser Capabilities;37
7.1.2;Silverlight 4;37
7.1.2.1;Business Application Development;37
7.1.2.2;Developer Tools;38
7.1.2.3;Interactive User Experiences;38
7.1.2.4;Out-of-Browser Programming Model;39
7.1.3;Silverlight and Visual Studio 2010;39
7.2;1-1. Setting Up the Silverlight 4 Environment;40
7.2.1;Problem;40
7.2.2;Solution;41
7.2.3;How It Works;41
7.3;1-2. Installing Additional Silverlight-Related Services and Controls;41
7.3.1;Problem;41
7.3.2;Solution;42
7.3.3;How It Works;42
7.4;1-3. Understanding the Structure of a Silverlight Solution;42
7.4.1;Problem;42
7.4.2;Solution;42
7.4.3;How It Works;43
7.4.4;The Code;44
7.5;1-4. Understanding the Developer/Designer Workflow;52
7.5.1;Problem;52
7.5.2;Solution;52
7.5.3;How It Works;53
7.5.3.1;The Tools;53
7.5.3.2;The Process;54
7.6;1-5. Understanding the Basics of Expression Blend 4;56
7.6.1;Problem;56
7.6.2;Solution;56
7.6.3;How It Works;56
7.6.4;The Code;58
7.7;1-6. Accessing Source Control;63
7.7.1;Problem;63
7.7.2;Solution;63
7.7.3;How It Works;63
7.8;1-7. Running Silverlight 4 on a Mac;64
7.8.1;Problem;64
7.8.2;Solution;64
7.8.3;How It Works;64
7.9;1-8. Running Silverlight on Linux;64
7.9.1;Problem;64
7.9.2;Solution;65
7.9.3;How It Works;65
8;CHAPTER 2 Application Design and Programming Model;66
8.1;The Mechanics of Silverlight Applications;66
8.2;2-1. Leverage and Locate Controls and Classes;68
8.2.1;Problem;68
8.2.2;Solution;68
8.2.3;How It Works;68
8.2.3.1;Add a Custom Control;68
8.2.3.2;Find a Control;68
8.3;2-2. Dynamically Loading XAML;79
8.3.1;Problem;79
8.3.2;Solution;79
8.3.3;How It Works;79
8.3.4;The Code;79
8.4;2-3. Persisting Data on the Client;85
8.4.1;Problem;85
8.4.2;Solution;85
8.4.3;How It Works;85
8.4.4;The Code;87
8.5;2-4. Opening a Local File from a Silverlight Application;92
8.5.1;Problem;92
8.5.2;Solution;92
8.5.3;How It Works;92
8.5.4;The Code;93
8.6;2-5. Accessing XML Data;96
8.6.1;Problem;96
8.6.2;Solution;96
8.6.3;How It Works;97
8.6.4;The Code;97
8.7;2-6. Managing Unhandled Exceptions;101
8.7.1;Problem;101
8.7.2;Solution;102
8.7.3;How It Works;102
8.8;2-7. Executing Work on a Background Thread with Updates;102
8.8.1;Problem;102
8.8.2;Solution;103
8.8.3;How It Works;103
8.8.4;The Code;104
8.9;2-8. Updating the UI from a Background Thread;112
8.9.1;Problem;112
8.9.2;Solution;112
8.9.3;How It Works;113
8.9.4;The Code;114
8.10;2-9. Managing XAML Resources;117
8.10.1;Problem;117
8.10.2;Solution;117
8.10.3;How It Works;117
8.10.4;The Code;118
8.11;2-10. Managing Embedded Resources;122
8.11.1;Problem;122
8.11.2;Solution;122
8.11.3;How It Works;122
8.11.4;The Code;122
8.12;2-11. Creating Silverlight Using Ruby, Python, or JScript;127
8.12.1;Problem;127
8.12.2;Solution;127
8.12.3;How It Works;127
8.12.4;The Code;128
8.13;2-12. Creating Application Services;131
8.13.1;Problem;131
8.13.2;Solution;131
8.13.3;How It Works;131
8.13.4;The Code;132
8.14;2-13. Managing Resources in Large Projects;136
8.14.1;Problem;136
8.14.2;Solution;136
8.14.3;How It Works;137
8.14.4;The Code;137
8.15;2-14. Save a File Anywhere on the User’s System;139
8.15.1;Problem;139
8.15.2;Solution;140
8.15.3;How It Works;140
8.15.4;The Code;140
9;CHAPTER 3 Developing User Experiences;142
9.1;3-1. Importing Art from Expression Design;143
9.1.1;Problem;143
9.1.2;Solution;143
9.1.3;How It Works;143
9.2;3-2. Working with Color and Gradients in Blend;146
9.2.1;Problem;146
9.2.2;Solution;146
9.2.3;How It Works;146
9.2.4;The Code;149
9.3;3-3. Positioning UI Elements;153
9.3.1;Problem;153
9.3.2;Solution;153
9.3.3;How It Works;153
9.3.3.1;Canvas;154
9.3.3.2;Grid;155
9.3.4;The Code;156
9.3.4.1;Code for Canvas;156
9.3.4.2;Code for StackPanel;158
9.3.4.3;Code for the Grid;159
9.4;3-4. Drawing with Shapes, Paths, and Geometries;162
9.4.1;Problem;162
9.4.2;Solution;163
9.4.3;How It Works;163
9.4.3.1;Drawing with Shapes;163
9.4.3.2;Drawing with Path Objects;168
9.4.3.3;Drawing with Geometries;169
9.4.4;The Code;170
9.4.4.1;Drawing with Paths;170
9.4.4.2;Drawing with Geometries;175
9.5;3-5. Providing Scrollable Content;180
9.5.1;Problem;180
9.5.2;Solution;180
9.5.3;How It Works;181
9.5.4;The Code;181
9.6;3-6. Applying a Border to Elements;183
9.6.1;Problem;183
9.6.2;Solution;183
9.6.3;How It Works;183
9.6.4;The Code;186
9.7;3-7. Using Simple Animations with Objects;188
9.7.1;Problem;188
9.7.2;Solution;188
9.7.3;How It Works;188
9.7.4;The Code;189
9.8;3-8. Animating UI Elements with Keyframes;195
9.8.1;Problem;195
9.8.2;Solution;195
9.8.3;How It Works;195
9.8.4;The Code;198
9.9;3-9. Transforming an Object;200
9.9.1;Problem;200
9.9.2;Solution;201
9.9.3;How It Works;201
9.9.4;The Code;202
9.10;3-10. Creating a Simple Cartoon Scene;206
9.10.1;Problem;206
9.10.2;Solution;206
9.10.3;How It Works;206
9.10.4;The Code;206
9.11;3-11. Handling Keyboard Input;211
9.11.1;Problem;211
9.11.2;Solution;211
9.11.3;How It Works;211
9.11.4;The Code;212
9.12;3-12. Working with Ink;215
9.12.1;Problem;215
9.12.2;Solution;215
9.12.3;How It Works;216
9.12.4;The Code;216
9.13;3-13. Adding 3-D Effects to UI Elements;222
9.13.1;Problem;222
9.13.2;Solution;222
9.13.3;How It Works;222
9.13.4;The Code;223
9.14;3-14. Dynamically Creating Bitmaps;229
9.14.1;Problem;229
9.14.2;Solution;229
9.14.3;How It Works;229
9.14.4;The Code;230
9.15;3-15. Improving Graphic Animation and Video Performance;236
9.15.1;Problem;236
9.15.2;Solution;236
9.15.3;How It Works;236
9.15.4;The Code;237
9.16;3-16. Improve Animation with Custom Easing Functions;240
9.16.1;Problem;240
9.16.2;Solution;240
9.16.3;How It Works;240
9.16.4;The Code;241
9.17;3-17. Adding Pixel Shader Visual Effects;247
9.17.1;Problem;247
9.17.2;Solution;247
9.17.3;How It Works;247
9.17.4;The Code;248
9.18;3-18. Create and Work with Design-Time Data in Expression Blend;252
9.18.1;Problem;252
9.18.2;Solution;252
9.18.3;How It Works;252
9.18.4;The Code;255
9.19;3-19. Reuse Application Interactivity with Behaviors;262
9.19.1;Problem;262
9.19.2;Solution;262
9.19.3;How It Works;262
9.19.4;The Code;263
9.20;3-20. Customizing the Right-Click Context Menu;264
9.20.1;Problem;264
9.20.2;How it Works;265
9.20.3;The Code;265
9.21;3-21. Accessing the Clipboard;269
9.21.1;Problem;269
9.21.2;How it Works;269
9.21.3;The Code;270
9.22;3-22. Using Right-to-Left Text;272
9.22.1;Problem;272
9.22.2;How it Works;273
9.22.3;The Code;273
9.23;3-23. Prototype Application Design;274
9.23.1;Problem;274
9.23.2;Solution;275
9.23.3;How It Works;275
9.23.4;The Code;275
10;CHAPTER 4 Data Binding;277
10.1;4-1. Binding Application Data to the UI;277
10.1.1;Problem;277
10.1.2;Solution;277
10.1.3;How It Works;277
10.1.3.1;Binding Expression;277
10.1.3.2;Dependency Properties;278
10.1.3.3;Associating the Data Source;278
10.1.4;The Code;279
10.2;4-2. Binding Using a DataTemplate;285
10.2.1;Problem;285
10.2.2;Solution;285
10.2.3;How It Works;285
10.2.3.1;Declaring a DataTemplate;285
10.2.3.2;Using a DataTemplate;287
10.2.4;The Code;287
10.3;4-3. Receiving Change Notifications for Bound Data;293
10.3.1;Problem;293
10.3.2;Solution;293
10.3.3;How It Works;293
10.3.3.1;Change Notification for Noncollection Types;293
10.3.3.2;Change Notification for Collection Types;294
10.3.4;The Code;295
10.4;4-4. Converting Values During Data Binding;310
10.4.1;Problem;310
10.4.2;Solution;310
10.4.3;How It Works;310
10.4.3.1;Implementing Value Conversion;311
10.4.4;The Code;312
10.5;4-5. Binding Across Elements;323
10.5.1;Problem;323
10.5.2;Solution;323
10.5.3;How It Works;323
10.5.3.1;Binding to Another Element;323
10.5.3.2;Binding to Self;324
10.5.3.3;Binding to the TemplatedParent;324
10.5.4;The Code;325
10.6;4-6. Validating Input for Bound Data;331
10.6.1;Problem;331
10.6.2;Solution;331
10.6.3;How It Works;331
10.6.3.1;Validation Error Notification;331
10.6.3.2;Getting Error Information;331
10.6.3.3;Getting a Validation Error Summary;332
10.6.4;The Code;332
10.7;4-7. Controlling Updates;346
10.7.1;Problem;346
10.7.2;Solution;346
10.7.3;How It Works;346
10.7.4;The Code;347
10.8;4-8. Providing reasonable defaults for bound data;356
10.8.1;Problem;356
10.8.2;Solution;356
10.8.3;How It Works;356
10.8.3.1;Null Value Replacement;357
10.8.3.2;Fallback value;357
10.8.3.3;String Formatting;358
10.8.4;The Code;358
11;CHAPTER 5 Controls;362
11.1;A Word About the Samples;363
11.2;5-1. Customizing a Control’s Basic Appearance;363
11.2.1;Problem;363
11.2.2;Solution;363
11.2.3;How It Works;363
11.2.3.1;Style Scoping;364
11.2.4;The Code;365
11.3;5-2. Replacing the Default UI of a Control;367
11.3.1;Problem;367
11.3.2;Solution;367
11.3.3;How It Works;367
11.3.3.1;Control Template Syntax;367
11.3.3.2;Setting the Template;367
11.3.3.3;Using Expression Blend to Design a Template;368
11.3.3.4;Template Bindings;370
11.3.3.5;Content Model and Presenter Controls;371
11.3.3.6;Visual State Management;373
11.3.4;The Code;377
11.4;5-3. Customizing the Default ListBoxItem UI;383
11.4.1;Problem;383
11.4.2;Solution;383
11.4.3;How It Works;383
11.4.4;The Code;384
11.5;5-4. Displaying Information in a Pop-up;392
11.5.1;Problem;392
11.5.2;Solution;392
11.5.3;How It Works;392
11.5.3.1;Creating and Initializing the Pop-up;392
11.5.3.2;Positioning the Pop-up;392
11.5.3.3;Creating Pop-up Content;394
11.5.4;The Code;394
11.6;5-5. Displaying Row Details in a DataGrid;404
11.6.1;Problem;404
11.6.2;Solution;404
11.6.3;How It Works;404
11.6.4;The Code;404
11.7;5-6. Applying Custom Templates to a DataGrid Cell;414
11.7.1;Problem;414
11.7.2;Solution;414
11.7.3;How It Works;414
11.7.4;The Code;414
11.8;5-7. Creating Custom Column Types for a DataGrid;420
11.8.1;Problem;420
11.8.2;Solution;420
11.8.3;How It Works;420
11.8.3.1;The GenerateElement() Method;421
11.8.3.2;The GenerateEditingElement() Method;421
11.8.3.3;The PrepareCellForEdit() Method;422
11.8.3.4;The CancelCellEdit() Method;422
11.8.4;The Code;422
11.9;5-8. Creating a Composite User Control;427
11.9.1;Problem;427
11.9.2;Solution;427
11.9.3;How It Works;427
11.9.3.1;User Control Structure;428
11.9.3.2;XAML Loading;429
11.9.3.3;Dependency Properties;431
11.9.4;The Code;432
11.10;5-9. Creating a Custom Layout Container;441
11.10.1;Problem;441
11.10.2;Solution;442
11.10.3;How It Works;442
11.10.3.1;Motivation and Mechanics;442
11.10.3.2;The MeasureOverride() Method;442
11.10.3.3;The ArrangeOverride() Method;443
11.10.4;The Code;443
11.10.4.1;Using the WrapPanel;449
11.11;5-10. Creating a Custom Control;454
11.11.1;Problem;454
11.11.2;Solution;455
11.11.3;How It Works;455
11.11.3.1;Custom Control Structure;455
11.11.3.2;TemplateBinding vs. RelativeSource Binding to TemplatedParent;457
11.11.4;The Code;458
11.11.4.1;Using the Control;463
11.12;5-11. Defining a Custom Visual State;471
11.12.1;Problem;471
11.12.2;Solution;471
11.12.3;How It Works;471
11.12.4;The Code;472
11.13;5-12. Controlling ScrollViewer Scroll Behavior;483
11.13.1;Problem;483
11.13.2;Solution;483
11.13.3;How It Works;483
11.13.3.1;The VisualTreeHelper class;483
11.13.4;The Code;484
11.14;5-13. Customizing the Binding Validation User Interface;492
11.14.1;Problem;492
11.14.2;Solution;493
11.14.3;How It Works;493
11.14.3.1;Validation Error Tooltip;493
11.14.3.2;The ValidationSummary Control;497
11.14.4;The Code;498
11.15;5-14. Control Behavior in Expression Blend;508
11.15.1;Problem;508
11.15.2;Solution;508
11.15.3;How It Works;508
11.15.3.1;Property Attributes;508
11.15.3.2;Designer-Unsafe Code;510
11.15.3.3;Including Sample Data;511
11.15.4;The Code;512
11.16;5.15 Enhancing the Design Experience with Behaviors and Triggers;515
11.16.1;Problem;515
11.16.2;Solution;515
11.16.3;How It Works;515
11.16.3.1;Behavior;515
11.16.3.2;Triggers and Actions;516
11.16.4;The Code;517
12;CHAPTER 6 Browser Integration;524
12.1;6-1. Host Silverlight on Any Technology;524
12.1.1;Problem;524
12.1.2;Solution;525
12.1.3;How It Works;525
12.1.4;The Code;527
12.2;6-2. Setting Focus for Keyboard Input;529
12.2.1;Problem;529
12.2.2;Solution;529
12.2.3;How It Works;530
12.2.4;The Code;530
12.3;6-3. Implementing a Full-Screen UI;535
12.3.1;Problem;535
12.3.2;Solution;535
12.3.3;How It Works;535
12.3.4;The Code;537
12.4;6-4. Calling a JavaScript Method from Managed Code;544
12.4.1;Problem;544
12.4.2;Solution;544
12.4.3;How It Works;544
12.4.4;The Code;546
12.5;6-5. Calling a Managed Code Method from JavaScript;552
12.5.1;Problem;552
12.5.2;Solution;552
12.5.3;How It Works;553
12.5.4;The Code;554
12.6;6-6. Exchanging Data Among Multiple Plug-ins;561
12.6.1;Problem;561
12.6.2;Solution;561
12.6.3;How It Works;561
12.6.4;The Code;562
12.7;6-7. Layering HTML over the Silverlight Plug-in;567
12.7.1;Problem;567
12.7.2;Solution;567
12.7.3;How It Works;568
12.7.4;The Code;568
12.8;6-8. Hosting HTML in a Silverlight Application;570
12.8.1;Problem;570
12.8.2;Solution;570
12.8.3;How It Works;571
12.8.4;The Code;571
12.9;6-9. Painting a Silverlight Element with HTML;573
12.9.1;Problem;573
12.9.2;Solution;573
12.9.3;How It Works;573
12.9.4;The Code;573
12.10;6-10. Taking Advantage of the Navigation Framework;575
12.10.1;Problem;575
12.10.2;Solution;575
12.10.3;How It Works;575
12.10.4;The Code;578
12.11;6-11. Embedding Silverlight within a Windows Gadget;584
12.11.1;Problem;584
12.11.2;Solution;584
12.11.3;How It Works;584
12.11.4;The Code;589
12.12;6-12. Embedding Silverlight in an Internet Explorer 8 Web Slice;600
12.12.1;Problem;600
12.12.2;Solution;600
12.12.3;How It Works;600
12.12.4;The Code;600
13;CHAPTER 7 Networking and Web Service Integration;606
13.1;A Quick Word about the Samples;607
13.2;7-1. Consuming a WCF Service;608
13.2.1;Problem;608
13.2.2;Solution;608
13.2.3;How It Works;608
13.2.3.1;Invoking a Service Operation;610
13.2.3.2;Configuring a WCF Service for Silverlight;611
13.2.4;The Code;612
13.3;7-2. Exchanging XML Messages over HTTP;629
13.3.1;Problem;629
13.3.2;Solution;629
13.3.3;How It Works;629
13.3.3.1;Using HttpWebRequest/HttpWebResponse in Silverlight;630
13.3.3.2;Configuring WCF to Use Non-SOAP Endpoints;631
13.3.4;The Code;631
13.4;7-3. Using JSON Serialization over HTTP;642
13.4.1;Problem;642
13.4.2;Solution;642
13.4.3;How It Works;642
13.4.3.1;JSON;642
13.4.3.2;Using the DataContractJsonSerializer Type;643
13.4.3.3;Configuring WCF to Use JSON;643
13.4.4;The Code;644
13.5;7-4. Accessing Resources over HTTP;647
13.5.1;Problem;647
13.5.2;Solution;647
13.5.3;How It Works;647
13.5.3.1;Downloading/Uploading Resources;647
13.5.3.2;Reading/Writing Remote Streams;648
13.5.3.3;WebClient and HTTP Endpoints;648
13.5.3.4;Canceling Long-Running Operations;648
13.5.4;The Code;648
13.6;7-5. Using Sockets to Communicate over TCP;672
13.6.1;Problem;672
13.6.2;Solution;672
13.6.3;How It Works;672
13.6.3.1;The Sockets API in Silverlight;673
13.6.3.2;Cross-Domain Policy and Port Requirements;675
13.6.4;The Code;675
13.6.4.1;Running the Sample Code;675
13.6.4.2;The Client;676
13.6.4.3;The Chat Server;695
13.6.4.4;The Policy Server;702
13.7;7-6. Enabling Cross-Domain Access;705
13.7.1;Problem;705
13.7.2;Solution;705
13.7.3;How It Works;705
13.7.4;The Code;707
13.8;7-7. Exchanging Data between Silverlight Applications;709
13.8.1;Problem;709
13.8.2;Solution;709
13.8.3;How It Works;709
13.8.3.1;Receiver Registration;709
13.8.3.2;Receiving Messages;710
13.8.3.3;Sending Messages;711
13.8.3.4;Request-Response;712
13.8.4;The Code;712
14;CHAPTER 8 Building Out Of Browser Silverlight Applications;728
14.1;8-1. Building a Silverlight application to run outside the browser;728
14.1.1;Problem;728
14.1.2;Solution;729
14.1.3;How It Works;729
14.1.3.1;Preparing the Application;729
14.1.3.2;Installing the Application;731
14.1.3.3;Customizing the Installation Flow;732
14.1.3.4;Sensing Network Availability;734
14.1.3.5;Updating Locally Installed Applications;734
14.1.4;The Code;735
14.2;8-2. Controlling the Application Window;751
14.2.1;Problem;751
14.2.2;Solution;751
14.2.3;How It Works;751
14.2.3.1;Window Attributes;751
14.2.3.2;Resizing and moving a Window;753
14.2.4;The Code;753
14.3;8-3. Using COM Interoperability and File System Access;759
14.3.1;Problem;759
14.3.2;Solution;760
14.3.3;How It Works;760
14.3.3.1;COM Interoperability;760
14.3.3.2;Instantiating a COM object;760
14.3.3.3;Handling a COM event;761
14.3.3.4;File System Access;762
14.3.4;The Code;762
14.3.4.1;Windows Image Acquisition;763
14.3.4.2;The Application Code;766
14.3.4.3;Saving Images to the disk;772
14.3.4.4;Taskbar Notification;772
15;CHAPTER 9 Building LOB Applications;774
15.1;Silverlight LOB Enhancements;774
15.2;Data Access Enhancements;774
15.2.1;WCF Data Services;775
15.2.2;WCF RIA Services;775
15.3;9-1. Accessing RESTful Data using OData;775
15.3.1;Problem;775
15.3.2;Solution;775
15.3.3;How It Works;776
15.3.4;The Code;776
15.4;9-2. Using Visual Studio 2010 WCF Data Services Tooling;779
15.4.1;Problem;779
15.4.2;Solution;779
15.4.3;How It Works;779
15.4.4;The Code;779
15.5;9-3. Implementing CRUD Operations in WCF Data Services;785
15.5.1;Problem;785
15.5.2;Solution;785
15.5.3;How It Works;786
15.5.4;The Code;786
15.6;9-4. Using Visual Studio 2010 WCF RIA Data Services Tooling;789
15.6.1;Problem;789
15.6.2;Solution;789
15.6.3;How It Works;789
15.6.4;The Code;790
15.7;9-5. Taking Advantage of the Business Application Template;797
15.7.1;Problem;797
15.7.2;Solution;797
15.7.3;How It Works;797
15.7.4;The Code;797
15.8;9-6. Databinding in XAML;799
15.8.1;Problem;799
15.8.2;Solution;799
15.8.3;How It Works;800
15.8.4;The Code;800
15.9;9-7. Navigating RIA LOB Data;802
15.9.1;Problem;802
15.9.2;Solution;802
15.9.3;How It Works;802
15.9.4;The Code;802
15.10;9-8. Implementing CRUD Operations in RIA Services;804
15.10.1;Problem;804
15.10.2;Solution;804
15.10.3;How It Works;805
15.10.4;The Code;805
15.11;9-9. Data Validation through Data Annotation;808
15.11.1;Problem;808
15.11.2;Solution;808
15.11.3;How It Works;808
15.11.4;The Code;809
15.12;9-10. Printing in a Silverlight LOB Application;812
15.12.1;Problem;812
15.12.2;Solution;812
15.12.3;How It Works;812
15.12.4;The Code;812
16;CHAPTER 10 Integrating Rich Media;815
16.1;10-1. Adding Video to a Page;815
16.1.1;Problem;815
16.1.2;Solution;816
16.1.3;How It Works;816
16.1.3.1;Using MediaElement;816
16.1.3.2;VideoBrush;816
16.2;10-2. Creating a Complete Video Player;820
16.2.1;Problem;820
16.2.2;Solution;820
16.2.3;How It Works;820
16.2.3.1;Acquiring Media;820
16.2.3.2;Controlling Media Play;821
16.2.3.3;MediaElement States;821
16.2.3.4;Seeking Within the Media;822
16.2.3.5;Volume;823
16.2.4;The Code;823
16.2.4.1;Installing the Sample Code;823
16.2.4.2;The Player Code;824
16.2.4.3;The MediaSlider Custom Control;837
16.2.4.4;The MediaButtonsPanel Custom Control;847
16.3;10-3. Adding Streaming Media Support;851
16.3.1;Problem;851
16.3.2;Solution;852
16.3.3;How It Works;852
16.3.3.1;Network Considerations;852
16.3.3.2;Windows Media Services;853
16.3.3.3;Setting Up WMS 2008;853
16.3.3.4;Setting Up Publishing Points;855
16.3.4;The Code;857
16.3.4.1;Changes to the Player;858
16.4;10-4. Using Playlists to Package Media;892
16.4.1;Problem;892
16.4.2;Solution;892
16.4.3;How It Works;892
16.4.3.1;Server-Side Playlists;892
16.4.3.2;Client-Side Playlists;894
16.4.4;The Code;895
16.5;10-5. Using Markers to Display Timed Content;898
16.5.1;Problem;898
16.5.2;Solution;898
16.5.3;How It Works;898
16.5.3.1;Encoding Markers Using Expression Encoder 3;898
16.5.3.2;MediaElement and Markers;899
16.5.4;The Code;900
16.6;10-6. Displaying and Seeking Using SMPTE Timecodes;914
16.6.1;Problem;914
16.6.2;Solution;915
16.6.3;How It Works;915
16.6.3.1;Frame Rate;915
16.6.3.2;Timecodes;915
16.6.3.3;Timecodes and Silverlight;916
16.6.4;The Code;916
16.7;10-7. Building a Managed Decoder for Silverlight;928
16.7.1;Problem;928
16.7.2;Solution;928
16.7.3;How It Works;928
16.7.3.1;Silverlight, Containers, and Codecs;929
16.7.3.2;MediaStreamSource;929
16.7.3.3;Initializing the Media Stream;930
16.7.3.4;Sampling;932
16.7.3.5;Stream Switching;933
16.7.3.6;Seeking;934
16.7.4;The Code;934
16.7.4.1;The Recorder;934
16.7.4.2;The Custom MediaStreamSource;942
16.8;10-8. Using a WebCam;952
16.8.1;Problem;952
16.8.2;Solution;953
16.8.3;How It Works;953
16.8.3.1;Webcam and Microphone as devices;953
16.8.3.2;Video and Audio Format Choices;953
16.8.3.3;Starting Device Capture;954
16.8.3.4;Capturing a still image;954
16.8.4;The Code;955
16.9;10-9. Processing Raw WebCam Output;960
16.9.1;Problem;960
16.9.2;Solution;960
16.9.3;How It Works;960
16.9.3.1;VideoSink and AudioSink;960
16.9.4;The Code;961
17;CHAPTER 11 Integrating Microsoft IIS Smooth Streaming;976
17.1;11-1. Setting up Smooth Streaming;977
17.1.1;Problem;977
17.1.2;Solution;977
17.1.3;How It Works;977
17.1.3.1;IIS Media Services;977
17.1.3.2;Setting Up IIS7;981
17.1.3.3;The Silverlight Client/Smooth Streaming Server Data Exchange;982
17.1.3.4;Testing the Smooth Streaming Presentation;983
17.1.4;The Code;984
17.2;11-2. Using the SmoothStreamingMediaElement;984
17.2.1;Problem;984
17.2.2;Solution;985
17.2.3;How It Works;985
17.2.3.1;The IIS Smooth Streaming Player Development Kit;985
17.2.4;The Code;985
17.3;11-3. Adding Metadata Streams;990
17.3.1;Problem;990
17.3.2;Solution;990
17.3.3;How It Works;990
17.3.3.1;Streams and Tracks;991
17.3.4;The Code;993
17.3.4.1;Injecting the Metadata and Content;993
17.3.4.2;Using Metadata at Playback;996
17.4;11-4. Merging Data from External Manifests;1001
17.4.1;Problem;1001
17.4.2;Solution;1001
17.4.3;How It Works;1001
17.4.4;The Code;1002
17.4.4.1;Creating the External Manifests;1002
17.4.4.2;Merging the Manifests at Runtime;1003
17.5;11-5. Scheduling Additional Clips;1004
17.5.1;Problem;1004
17.5.2;Solution;1004
17.5.3;How It Works;1004
17.5.4;The Code;1005
17.6;11-6. Varying Playback Speeds;1008
17.6.1;Problem;1008
17.6.2;Solution;1009
17.6.3;How It Works;1009
17.6.4;The Code;1009
17.7;11-7. Combining Streams Using Composite Manifests;1009
17.7.1;Problem;1009
17.7.2;Solution;1010
17.7.3;How It Works;1010
17.7.4;The Code;1012
18;Index;1013




