Silverlight 2 Unleashed [1 ed.] 9780672330148, 0672330148

Full Color Code samples appear as they do in Visual Studio and Expression Blend! В  Printed entirely in color, with help

223 54 1MB

English Pages 567 Year 2008

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Copyright......Page 7
Foreword......Page 10
About the Author......Page 11
Acknowledgments......Page 12
We Want to Hear from You!......Page 13
About Code in This Book......Page 15
One Year Older......Page 16
Introducing Silverlight......Page 17
Where Does Silverlight Come From?......Page 18
Using Third-Party Plug-Ins......Page 21
Running on Multiple Platforms......Page 23
Making the Web Application Secure......Page 24
What Do You Need to Run Silverlight?......Page 25
Trying Silverlight Demos......Page 26
What Do You Need to Develop Silverlight?......Page 30
Reading the Documentation......Page 31
Looking into Silverlight’s Future......Page 33
Summary......Page 34
Using XML for Data......Page 35
Understanding XML Namespaces......Page 37
Defining Additional Namespaces......Page 38
Creating a Canvas with Children......Page 39
Attaching Properties: Canvas.Left and Canvas.Top......Page 40
Testing XAML Markup......Page 41
Setting Properties in XAML......Page 44
Composing Scenes in XAML......Page 46
Saving Typing, Saving Space......Page 48
Summary......Page 49
Transforming Visuals......Page 51
Types of Transforms......Page 53
Composing Transforms......Page 58
Creating a Basic Animation......Page 60
Understanding the Animation’s Elements......Page 61
Adding a Scale Animation......Page 63
Using Other Types of Animations......Page 64
Summary......Page 66
The Expression Studio in Short......Page 67
Starting Expression Blend......Page 68
Setting Options......Page 69
Creating a New Project......Page 70
Understanding the Panels......Page 71
Looking at the Files......Page 72
Working with Shapes......Page 73
Using the Properties Panel......Page 74
Using the Color Picker......Page 75
Creating a 3D Border Effect Using RadialGradientBrush......Page 77
Composing the Elements Hierarchy......Page 78
Summary......Page 79
Mixing Colors......Page 81
Seeing Through the Transparency Channel......Page 83
Seeing Through the Opacity......Page 85
Using Vector Graphics......Page 86
Adding Media to Your Scenes......Page 88
Controlling Sound and Video......Page 94
Checking the Other Properties......Page 97
Using Media to Write......Page 98
Using Web-Based Media......Page 100
Summary......Page 101
Creating Transforms......Page 103
Creating an OpacityMask......Page 104
Using Paths......Page 106
Clipping Path......Page 108
Grouping Controls......Page 109
Making a User Control......Page 112
Working on the Thumbnails Gallery......Page 115
Summary......Page 119
Creating a Test Page......Page 121
Understanding the object Tag......Page 123
Detecting Silverlight......Page 128
Integrating Silverlight in an Existing Web Page......Page 129
Getting Web Space......Page 134
Getting Started with FTP......Page 136
Copying Your Silverlight Application......Page 138
Summary......Page 140
Programming Silverlight with JavaScript......Page 143
Learning the Basics......Page 144
Understanding the Concept of Objects......Page 150
Using the Literal Notation JSON......Page 152
Static Members......Page 154
Loading Scripts in a Web Page......Page 155
Understanding the Context......Page 156
Integrating Silverlight in an Existing Web Page Using JavaScript......Page 157
Debugging......Page 164
Summary......Page 165
History of .NET......Page 167
Creating a Silverlight 2 Application in Visual Studio 2008......Page 170
Intellisense......Page 176
Programming C# with Basic Constructs......Page 177
Summary......Page 188
Programming with Objects in C#......Page 189
Adding Interactivity to the Thumbnails Application......Page 195
Overloading Methods......Page 199
Raising Events and Using Delegates......Page 200
Storing Data on the Client......Page 204
Summary......Page 211
Animating Elements in Blend......Page 213
Synchronizing Animations......Page 218
PointAnimation......Page 220
Starting and Stopping the Animation......Page 222
Working on the Thumbnails Gallery......Page 224
Summary......Page 235
Before We Start.........Page 237
Setting Options......Page 238
Understanding the Panels......Page 239
Importing a Video......Page 240
Specifying the Output Type......Page 241
Testing Before Encoding......Page 245
Setting Metadata......Page 246
Encoding the Video for Silverlight......Page 249
Checking the Result......Page 250
Advanced Parameters......Page 251
Summary......Page 252
Why Streaming?......Page 253
Publishing on Your Own Website......Page 254
Adding an Overlay......Page 255
Letting Your Users Choose the Player......Page 259
Publishing on Microsoft Silverlight Streaming Servers......Page 264
Adding the Application in an Existing Web Page......Page 266
Firing Script Commands (and Catching Them)......Page 268
Modifying the Player Template in Blend......Page 270
Summary......Page 273
Making .NET Available to JavaScript......Page 275
Handling .NET Events in JavaScript......Page 277
Calling JavaScript Methods from .NET......Page 281
Calling .NET Methods from JavaScript......Page 283
Adding a “Login” Dialog to the Thumbnails Application......Page 284
Summary......Page 303
Exploring the Class Hierarchy......Page 305
Choosing XAML or Code-Behind......Page 307
Packing and Laying out with Panels......Page 310
Scrolling and Bordering......Page 321
Using Pop-Ups......Page 324
Drawing Shapes......Page 325
Summary......Page 327
Understanding the Control Class......Page 329
Discovering Basic Controls......Page 331
Picking Dates with Calendar and DatePicker......Page 339
Writing with Ink......Page 341
Making a Simple Drawing Application......Page 342
Presenting Data with ItemsControls......Page 349
Deep Zooming Your Image Collection......Page 351
Summary......Page 354
Using Resources, Styling, and Templating......Page 355
Storing Items in Collections......Page 356
Using ResourceDictionaries in Silverlight......Page 357
Styling a Control......Page 362
Styling the Thumbnails Application......Page 366
Embedding Fonts in the Application......Page 368
Templating the Lookless Control......Page 370
Summary......Page 375
Understanding Data Binding......Page 377
Digging in the Binding Class......Page 383
Setting the DataContext......Page 384
Using Data Controls......Page 386
Summary......Page 400
Creating a Thumbnails Viewer User Control......Page 401
Creating the Items and Designing a DataTemplate......Page 411
Creating a MediaInfoDisplay Custom Control......Page 419
Summary......Page 428
Creating a Default Template for the MediaInfoDisplay Control......Page 429
Using the MediaInfoDisplay Control......Page 431
Scrolling the Items......Page 436
Creating a New RepeatButton Template......Page 439
Exporting Classes to an External Assembly and Refactoring......Page 443
Talking About the Application Object......Page 448
Using Generics......Page 450
Summary......Page 451
Taking Silverlight 2 Even Further......Page 453
Registering Multiple JavaScript Event Handlers......Page 454
Finding Silverlight Elements in JavaScript......Page 455
Accessing the HTML Page From .NET......Page 457
Exchanging Data Between .NET and JavaScript......Page 459
Passing Initialization Parameters......Page 467
Attaching .NET Events to HTML Elements......Page 468
Publishing Directly from Visual Studio......Page 471
Debugging Your Silverlight Application......Page 472
Summary......Page 479
Creating and Loading an XML File......Page 481
Loading a Zip File and Showing Progress......Page 494
Making Requests to WCF Services......Page 502
More Connectivity......Page 511
Summary......Page 512
Placing Cross-domain Requests......Page 513
Communicating with Third-Party Services......Page 517
Placing POST Requests......Page 530
Throwing and Catching Exceptions......Page 531
Summary......Page 539
Updating a Service Reference......Page 541
Killing a Process......Page 542
About Protecting Your Work......Page 544
Binding in Special Configurations......Page 545
Using the ASP.NET Controls Silverlight and MediaPlayer......Page 550
Creating Unit Tests for Silverlight......Page 555
Making or Buying XAML Resources......Page 563
Using Third-Party Controls and Libraries......Page 566
Summary......Page 567

Silverlight 2 Unleashed [1 ed.]
 9780672330148, 0672330148

  • Commentary
  • 56174
  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up