0-based index, 51
3D border effects, creating with RadialGradientBrush in Expression Blend, 63
abstract classes, 32
ActiveX controls, 8
Add Service Reference dialog, 528
Add Silverlight Application dialog box, 263
adding
comments to XML documents, 27
Full Screen button to Expression video player, 256–259
interactivity to Thumbnails project, 181–185
media to scenes, 74–79
overlays to videos, 242
Adding a namespace listing (18.2), 366
Adding a SolidColorBrush listing (24.20), 545
Adding an event handler listing (22.21), 486
Adding and removing items listing (18.16), 379
Adding elements to a Grid in code listing (15.7), 307
Adding event handlers listing (22.30), 495
Adding namespaces listing (19.9), 397
Adding the SelectionChanged event handler listing (19.15), 404
AddUser and ValidateUser methods listing (22.31), 495
AddUser method, 276–277, 493, 495
AddUserCompleted event handler, 497
Adobe Flash, 8
Adobe Illustrator, converters, 551
adorners, 77
advanced parameters in Expression Encoder, 237
advanced properties, setting for overlays, 242
affine transforms, 37
agTweener, 552
airline application demo, 14
AJAX, 7
Alpha channel, 67–71
ancestors, 180
animations
color animations, 51
elements, 204–205
PointAnimation, 206
properties, editing, 202–203
rotating, 46–48
scale animations, 49–50
Silverlight, adding to Thumbnails project, 210–213, 215–220
smooth transitions, 50
starting and stopping, 208
storyboards
reversing, 206
triggering, 201–202
synchronizing, 204
testing in Blend, 201
anonymous types, 476
Another button listing (14.9), 268
API keys, obtaining Flickr, 504
App.xaml file, storing resources in, 347–348
Apple Macintosh computers, debugging applications, 465
application assemblies, versioning, 434
Application object, 434–435
applications
client applications, updating, 494–497
code, stepping through, 459–461
Debug version, 458
debugging, 458–465
drawing applications
creating, 328–335
running, 335
HTML, blending with, 285
initializing JavaScript, 453–454
items, scrolling, 422–425
JavaScriptDotNet, 439–443
media information, removing, 467–468
parameters, passing, 470
refactoring, 430–434
Release version, 458–459
rich interactive applications, 499
running applications, debugging, 464–465
startup screens, adding, 468–469
test applications, creating, 542–544
testing, 480
Thumbnails application
embedding fonts in, 354–356
styling, 352–354
thumbnails viewer, creating, 387–396
web browsers, caching, 439
Applying the template listing (19.26), 414
ArrayList (old implementation) listing {20.11}, 436
arrays, JavaScript, 452
ASP.NET control listing (24.10), 536
ASP.NET controls, 536–541
aspect ratio of videos, changing in Expression Encoder, 228
ASPX versus HTML, 160
attached properties, 305–307
Attaching an event listing (21.25), 455
attaching properties, 26
auto-play, disabling for videos, 80
automatic property, 178–179
background parameter (object tag), 110
backslash characters, C#, 391
Barber, Corrina, 550
binary numbering system, 68
Binding class, 369–370
Binding to an object listing (24.8), 535
Binding to the DataContext listing (24.9), 535
bindings
Binding class, 369–370
Blend, setting in, 531–532
Converter classes, 534–535
data binding, 363
data object creation, 364–369
data objects, writing to, 366–367
errors, notifications, 367–368
objects, 535–536
special configurations, 531–536
templates, 427
to controls, 359–360
validation errors, handling, 533–534
values, converting in, 368–369
blog sites
Abrams, Brad, 121
HTML tags, adding, 115
Silverlight-related blogs, 553
blueprints, creating custom controls, 405–406
borders, surrounding elements with, 308–310
Bouquain, Thierry, 552
breakpoints, conditional, 461
Brush in App.xaml listing (24.24), 547
brushes, storing resources in, 345
bubbling exceptions, 518–519
Bubbling exceptions listing (23.24), 518
build actions, checking media files, 282–283
built-in objects (JavaScript), 133
built-in types (.NET), 163
ButtonBase control, 319–320
C#
backslash character, 391
Border element, 309
casting, 185
elements, 294
loops
do_while, 170
for, 167
for_each, 168–169
if_then_else, 166–167
while, 169
methods, overloading, 185–186
namespaces, 176
operators
conditional, 174
logical, 173
mathematical, 171–172
parenthesis, 174
Popup, 310
properties, 178–179
resources, defining, 344
ScrollViewer, 308
switch_case operator, 170–171
TabControl, 336
TextBlock control, 317
type conversion, 165
types
floating point types, 164–165
integer types, 163
using directive, 176–177
visibility, 177
C# Elements listing (15.2), 294
c: emp directory, availability, 489
Cache panel listing (22.2), 469
cacheFadeOut_Completed event handler, 479
caching applications, web browsers, 439
Calendar control, 325–326
Call to RegisterScriptableObject listing (14.2), 262
calling JavaScript methods from .NET, 267–269
Campbell, Dave, 553
Canvas class, 297–298
elements, dragging, 298–301
canvases
creating, 25–26
shapes, drawing on, 311–313
captions, adding to videos, 234
case sensitivity in JavaScript, 131
catching
.NET events, 285–287
unhandled exceptions, 522–524
chapters, adding to videos, 233–234
characteristics of XML documents, 22
CheckBox control, 320
CheckBox template, 358–361
Checking if someone subscribed listing (23.8), 506
Chess demo, 14
Class CounterTickedEventArgs listing (14.3), 263–264
class libraries
classes, moving to, 430
creating, 429–434
Class MyDate listing (21.11), 446
classes
Binding class, 369–370
Canvas, 297–301
class libraries, creating, 429–432, 434
Control, 315–317
Converter, 534–535
DataFile, 488–491
decorating, 407
DependencyObject, 292
EventArgs, 187
external assemblies, exporting to, 429–434
FrameworkElement, 293
generics, 436–437
GridSplitter, 324
hierarchy, 291–293
HtmlPage, 443–445
ItemsControls, 335–337
Media
creating, 388–390
extending, 390–391
MediaEx
creating, 390–391
extending, 481
MediaExCollection, creating, 391
MediaInformationFile, 469–472
MyDate, 446
Object, 292
Page, modifying, 278–280
scriptable classes, creating, 263–264
ScriptObject class, converting, 449–452
Settings, 421
silverlightControlHost, 443
Style, 348–352
creating, 348–349
priority system, 349–350
using, 349
StylusDevice, 332
System.Windows.Controls.Panel, 296–307
Thumb, 322–324
UIElement, 292–293
User, 517
UserInformation, 492
client applications
service references, adding to, 494–495
updating, 494–497
client-side proxies, 496
ClientBin, creating in MediaFiles folder, 401
clientPhoto_OpenReadCompleted event handler, 514
client_DownloadProgressChanged event handler, 483
client_DownloadStringCompleted event handler, 472
client_OpenReadCompleted event handler, 483–485
clipping paths, 94–95
code
Border element, 309
breakpoints, conditional, 461
debugging, 458–465
Grid layout, 303
intermediate language (IL) code, 429
.NET code, obfuscation, 530
Popup, 310
protecting, 530
ScrollViewer, 308
StackPanel, 301
stepping through, 459–461
TabControl, 336
TextBlock control, 317
variables
inspecting, 462–463
modifying, 462–463
code-behind
Grid, adding elements to, 307
resources, using in, 345
Code-behind for dragging listing (15.4), 299–300
codecs, allowing viewers to select, 245–250
collections, storing objects in, 342–343
color animations, 51
color picker (Expression Blend), 61
Color Slider listing (16.9), 329
colors
opacity, setting, 71
predefined color listing, 68
transparency, setting, 69–70
combining shapes, 93–94
comments
adding to XML documents, 27
writing in JavaScript, 130
comparing vector and raster graphics, 72
components
testing, 432
versioning, 434
composing
elements, 297
scenes in XAML, 32–34
transforms, 45
conditional breakpoints, 461
conditional operators, 173
configurations, binding special configurations, 531–536
configuring FTP client, 122–123
connecting to your web server, 123
constructors, User class, 271–272
Constructors of User class listing (14.13), 271
constructs
do_while, 170
for, 167
if_then_else, 166–167
while, 169–170
content controls, ScrollViewer, 307–308
Content Property, 35
ContentPresenter for a CheckBox listing (17.8), 361
Control class, 315–317
controls, 387
ASP.NET controls, 536–541
ButtonBase, 319–320
Calendar, 325–326
CheckBox, 320
custom controls
creating, 405–414
MediaInfoDisplay custom control, 405–414
DatePicker, 326–327
Ellipses, 387
enabling, 316
fonts, 317
HyperlinkButton, 319–320
Image, 74
InkPresenter, 327–328, 332–335
lockless controls, templating, 356–361
MediaElement, 387
MediaInfoDisplay control
creating templates, 419–420
default template creation, 415–417
removing test data, 421
scenes, adding to 418–419
test data, adding to, 417–418
transitions, 420–421
using, 417–422
wiring up, 421–422
MultiScaleImage, deep zooming, 339
Paths, 387
pop-ups, 310–311
primitives, 387
property setters, 348–350
RadioButton, 320
Rectangle, 387
RepeatButton, 319–320
changing transitions, 426–427
disabling, 423
event handlers, 423
styling, 427–428
template creation, 425–428
testing, 427
Scrollbar, 320–321
skins, 550–551
templates, binding, 359–360
templating, 316–317
TextBox, 318–319
third-party controls, 552
ThumbnailsViewerControl, packing, 391–393
ToggleButton, 319–320
user controls, 405
UserControl
connecting to real data, 403
creating, 387–396
DataTemplate, 399–401
moving media files, 401–402
namespaces, 397
removing test data source, 401
SelectionChanged event, 403–405
XAML media instances, 397–399
Convenience setter and getter listing (19.6), 395
conversions (data), 446–448
ConvertBack method, implementing, 368
Converter classes, 534–535
converters
Adobe Illustrator, 551
Flash, 551
converting
files to XAML, 551–552
ScriptObject class, 449–452
types to other types, 165
cookies, 190
copying Silverlight applications, 124–126
Corby, Karen, 503–504
Correcting the error listing (17.6), 347
CounterButton_Click event handler, 446
CounterTicked event
creating, 263–264
raising, 264–265
subscribing to on JavaScript side, 265–267
testing, 267
createDelegate method, 286
creating
canvases, 25–26
LinearGradientBrush in Expression Blend, 61–62
objects with JSON, 139–140
paths, 92
RadialGradientBrush in Expression Blend, 63
Silverlight 2 applications in Visual Studio 2008, 156, 161–162
compilation errors, finding, 158
Silverlight project files, 160–161
Web Site project files, 159
test pages, 107–108
transforms, 89
user controls, 98–101
Creating a StringReader listing (23.16), 512
Creating a StringReader listing (23.17), 512
creating new projects in Expression Blend, 56
cropping videos in Expression Encoder, 229
cross-domain policy files
Flash, 500
Silverlight, 501–502
cross-domain requests
placing, 499–503
restrictions, 502–503
Crumb bar, 352
CSS (Cascaded Style Sheets), 5
DHTML, 6
Silverlight, comparing with, 341
CSS class silverlightControlHost listing (21.7), 443
CSS rules listing (14.27), 284
custom controls, 405
blueprints, creating, 405–406
creating, 405–414
DependencyProperties, adding to, 408–410
MediaInfoDisplay custom control, creating, 405–414
parts
handling, 411–413
specifying, 407
shells, creating, 406–410
states
handling, 410–411
specifying, 407
templates, applying, 413–414
Custom Exception constructor listing (23.28), 523
Custom Exception constructor listing (23.29), 524
Custom Exception listing (23.26), 520
custom exceptions, creating, 523–524
CustomTimestamp property, 446
data, ItemsControls, presenting, 335–337
Binding class, 369–370
data objects, creating, 364–369
Data bound ThumbItemsControl listing (19.12), 398
Data class MyColor listing (18.12), 372
data conversions, 446–448
data objects
writing to, bindings, 366–367
Data property, drawing shapes, 312–313
data sources, XML data sources, 386
data templates, creating, 376–378
DataContext property, setting, 370–371
DataFile classes
moving to servers, 488–489
running on servers, 489–491
DataGrid
elements, editing, 385–386
manually defined columns, 383
using, 380–386
DataGrid with manually defined columns listing (18.20), 384
DataTemplate, designing for UserControl, 399–401
DataTemplate for a brush listing (18.14), 377
DatePicker control, 326–327
dates, picking, 325
Calendar control, 325–326
DatePicker control, 326–327
DateTimeConverter class listing (24.6), 534
Debug mode, killing processes, 530
Debug toolbar (Visual Studio), 460
Debug version, comparing with Release version, 458
debugging
applications, 458–465
running applications, 464–465
web sites, 463
declaring events, 188
decoding
JSON strings, 510–514
responses, 509–510
decorating classes, 407
deep zooming image collections, 337–339
Default Style for MediaInfoDisplay listing (20.2), 416
default templates, 357
editing, 357–358
MediaInfoDisplay control, creating for, 415–417
Defining a Style in XAML listing (17.7), 348
Defining resources in C# listing (17.2), 344
Defining resources in XAML listing (17.1), 344
defining XML namespaces, 24–25
delegates, 187–188
demos
airline application, 14
Chess, 14
Hard Rock Cafe, 15
Dependency Object class, 292
DependencyProperties, 292, 393–396
custom controls, adding to, 408–410
LongDescription DP, 409
MediaInfo DP, 410
registration, 394
SelectedItem DependencyProperty, 395–396
ShortDescription DP, 408
deprecated functionality, 154
derived types, 180
DescriptionPanelPart property, 411–412
DescriptionPanelPart property listing (19.24), 411
designing DataTemplate for UserControl, 399–401
detecting Silverlight version number with JavaScript, 149
developing Silverlight, requirements, 16–17
development web server, 108
DHTML (Dynamic HTML), 6
dialogs
Add Service Reference, 528
Add Silverlight Application, 263
login dialogs, Thumbnails application, 270–289
Publish Web Site, 457
disabling
auto–play feature for videos, 80
RepeatButtons, 423
ScrollBar, 308
Disabling both RepeatButtons listing (20.5), 423
display frame, adding to Thumbnails project, 101–102
Displaying the parameters listing (21.22), 454
DLLs (Dynamic-Link Libraries), 429, 432
documentation for Silverlight, installing, 18
DOM (Document Object Model), 443
DoubleAnimation property, 46–48
DoubleToThicknessConverter class listing (18.6), 368
DoubleToThicknessConverter in resources listing (18.7), 369
downloading videos versus streaming, 239–240
DoWork method, 527
do_while loop, 170
DPs (DependencyProperties), 50, 393–396
custom controls, adding to, 408–410
LongDescription DP, 409
MediaInfo DP, 410
registration, 394
SelectedItem DependencyProperty, 395–396
ShortDescription DP, 408
dragging elements on canvas, 298–301
Dragging a Thumb, C# code listing (16.2), 323
Dragging a Thumb, XAML markup listing (16.1), 322
drawing shapes, 311–313
drawing applications
creating, 328–335
events, handling, 330–335
running, 335
scenes preparing, 328–330
Dynamic HTML, 443
editing
DataGrid elements, 385–386
default templates, 357–358
editing animation properties, 202–203
elements
aligning Grid panel, 302–305
Border, 308–310
borders, surrounding with, 308–3101
ButtonBase control, 319–320
C#, 293–296
Calendar, 325–326
Canvas, 297–301
composing, 297
Control class, 315–317
DataGrid, editing, 385–386
DatePicker, 326–327
DeepZoom, 337–339
DependencyObject, 292
dragging, Canvas class, 298–301
FrameworkElement, 293
Grid panel, 302–307
GridSplitter, 324
grouping, 95–96
hierarchy, composing in Expression Blend, 64–65
HTML elements, attaching to .NET events, 454–457
InkPresenter, 327–328
ItemsControls, 335–337
JavaScript, finding in, 441–443
MultiScaleImage, 339
Object, 292
Popup, 310–311
reusable UI elements, 405
Scrollbar control, 320–322
ScrollViewer, 307–308
Slider control, 320–322
StackPanel, 301–302
TextBlock control, 317–318
TextBox control, 318–319
Thumb control, 322–323
UIElement, 292
walking the tree, 346–347
XAML, 293–296
Ellipses control, 387
embedded media files, 401
embedding
fonts, Thumbnails application, 354–356
HTML applications in existing web pages
using iframe, 253
using Live Control, 254
Empty ResourceDictionary listing (20.1), 416
enabling controls, 316
encoding videos for Silverlight, 235–236
Endless loop listing (24.2), 529
Enumerating the items and setting brushes listing (22.12), 478
enums, parsing, 476
equality operators, redefining, 272
Error handling listing (22.11), 478
errors, 478
bindings, notifications, 367–368
handling
JavaScript, 524
validation errors, 533–534
Event handler ColorSlider_ValueChanged listing (16.18), 334
Event handler CounterButton_Click listing (14.6), 265
Event handler CounterButton_Click listing (21.13), 446
Event handler handleCounterTicked listing (21.14), 447
Event handler handleNewUserClicked listing (14.32), 289
Event handler handleSubmitClicked listing (14.31), 288
Event handler HtmlButton_Click listing (21.26), 456
Event handler InkPresenter_MouseLeftButtonDown listing (16.14), 332
Event handler InkPresenter_MouseMove listing (16.15), 333
Event handler LoginLink_Click listing (14.25), 281
Event handler SaySomethingButton_Click listing (14.10), 268
Event handler SettingsButton_Click listing (16.17), 334
Event handler SetTitleButton_Click listing (21.10), 444
Event handler SizeSlider_ValueChanged listing (16.19), 335
event handlers, 413
adding to Thumbnails project, 181–182
AddUserCompleted, 497
cacheFadeOut_Completed, 479
clientPhoto_OpenReadCompleted, 514
client_DownloadProgressChanged, 483
client_DownloadStringCompleted, 472
client_OpenReadCompleted, 483–485
CounterButton_Click, 446
JavaScript, 135–136
LoginLink_Click, 281
mediaFile_DownloadProgressChanged, 486
_mediaFile_Loaded, 477
Media_Loaded, 487
Page_Loaded, 477
RepeatButtons, 423
SetTitleButton_Click, 444
ValidateUserCompleted, 496
VideoPlayer_Ended, 539
Event handlers for RepeatButtons listing (20.6), 423
Event handlers InkPresenter_MouseLeftButtonUp and LayoutRoot_MouseLeave listing (16.16), 333
Event handlers listing (19.25), 413
EventArgs class, 187
events
adding, 396
CounterTicked event
creating, 263–264
raising, 264–265
subscribing to on JavaScipt side, 265–267
testing, 267
declaring, 188
drawing applications, handling, 330–335
HTML events, handling, 288–289
Loaded, 470
.NET events
attaching to HTML elements, 454–457
catching, 285–287
handling in JavaScipt, 263–267
parameters, 187
raising, 187
SelectionChanged events, 396
subscribing to, 189
testing, 267
Exception instance, 521
exceptions
bubbling, 518–519
custom exceptions, creating, 523–524
packing, 520–521
re-throwing, 519–521
throwing, 517–521
unhandled exceptions, catching, 522–524
exchanging data between JavaScript and .NET, 445–452
executing Silverlight applications in browser, 59
exporting classes to external assemblies, 429–432, 434
Expression Blend
animations
properties, editing, 202–203
testing, 201
bindings, setting in, 531–532
color picker, 61
elements, grouping, 95–96
elements hierarchy, composing, 64–65
fonts, embedding in, 354–356
installing, 54
keyboard shortcuts, 60
keyframes, 199
launching, 54
LinearGradientBrush, creating, 61–62
options, 55–56
panels, 57–58
player template, adding Full Screen button, 256–257, 259
Project panel, 58–59
projects, creating, 56
properties, resetting to default value, 64
Properties panel, 60
RadialGradientBrush, creating, 63
resources, moving in, 354
results, testing in web browser, 77
running Silverlight applications in browser, 59
shapes, working with, 60
Style class
creating in, 350–351
editing in, 351–352
timelines, 200–201
transforms, creating, 89
Expression Design, creating XAML resources, 549–550
Expression Encoder, 224
advanced parameters, 237
captions, adding to videos, 234
chapters, adding to videos, 233–234
leader/trailer video segments, adding, 230
Metadata panel, 232–233
options, setting, 224–225
panels, 225
script commands, 254–256
videos
cropping, 229
encoding for Silverlight, 235–236
importing, 226–227
playing in full screen, 237
profiles, 227–228
size of, changing, 228
testing before encoding, 231–232
extending
Media class, 390–391
MediaEx class, 481
User object, 270–274
extension methods, 542, 544–548
extensions (markup), 346–347
external assemblies, exporting to classes, 429–434
ExtractResponse method, 509
ExtractResponse method listing (23.11), 509
Fajardo, Jose, 339
File clientaccesspolicy.xml, sample 1 listing (23.2), 501
File clientaccesspolicy.xml, sample 2 listing (23.3), 501
File crossdomain.xml listing (23.1), 500
files
XAML, converting to, 551–552
XML files, loading, 467–477, 479–480
Zip files
creating, 480
loading, 480–483
reading, 483–485
filtering LINQ (Language Integrated Query), 476
Flash, 8
converters, 551
cross-domain policy file, 500
Flick JSON response listing (23.14), 511
Flickr
API keys, obtaining, 504
requests, 504–508
responses, handling, 508–514
TOS (terms of service), accepting, 503
flickr-search entry listing (23.4), 505
floating point types, 164–165
flow layout, StackPanel, 301–302
Flow layout with StackPanel listing (15.5), 302
folders, References folder, 429
fonts
Blend expression, embedding in, 354–356
controls, 317
Thumbnails application, embedding in, 354–356
Visual Studio, embedding in, 356
for construct, 167
foreach construct, 168
formats, passing standard data formats, 448–449
FrameworkElement class, 293
frameworks, unit tests, 541
free-webhosts.com, 121
FTP client
configuring, 122–123
web server, connecting to, 123
Full Screen button, adding to Expression video player, 256–257, 259
full screen videos, playing, 237
functions (JavaScript), 132
future of Silverlight, 19
Generic class implementation listing (20.14), 437
Generic List (new implementation) listing {20.12}, 436
Generic method implementation listing (20.13), 436
GetColor method, 331
GetProperty method, 452
Getting and starting the Storyboard listing (22.13), 479
Getting the parameters at startup listing (21.23), 454
GetUser method, 277
global object (JavaScript), 137–138
Gomes, Celso, 19
GoToState method, 410
GoToState method listing (19.23), 410
Grid panel
adding elements to, 305–307
aligning elements, 302–305
GridSplitter class, 324
grouping elements, 95–96
Guthrie, Scott, 3
handleCounterTicked event handler, 447–449
handleNewUserClicked method, 289
handleSubmitClicked method, 288
handling
errors, 478
JavaScript, 524
events, 330–335
HTML, 288–289
.NET, 263–267
images, UserControl, 399–400
multiple users, 274–277
parts, custom controls, 411–413
SelectionChanged event, 403–405
states, custom controls, 410–411
third-party responses, 508–514
validation errors, 533–534
videos, UserControl, 400–401
hard disks, placing websites on, 282
Hard Rock Cafe demo, 15
hardware requirements for Silverlight, 11
height attribute (object tag), 109
Heuer, Tim, 553
hexidecimal numbering system, 68
hiding media from mouse input, 83
hiding ScrollBar, 308
hierarchy
classes, 291–293
inheritance, 291
history of CSS, 5
history of JavaScript, 5
history of Silverlight, 4
HTML
applications, blending with, 285
Dynamic HTML, 443
elements, attaching .NET events to, 454–457
events, handling, 288–289
login dialogs, adding applications to, 283–284
object tag, 109
background parameter, 110
height attribute, 109
id attribute, 109
onerror parameter, 110
onload parameter, 110
type attribute, 109
windowless parameter, 110
pages
access, preventing, 445
.NET, accessing, 443–445
versus ASPX, 160
HTML control listing (24.11), 536
HTML login dialog listing (14.26), 284
HtmlPage class, 443–445
HyperlinkButton control, 319–320
id attribute (object tag), 109
IDEs (Integrated Development Environments), Visual Studio, 457
iframe, embedding HTML applications in existing web pages, 253
if_then_else construct, 166–167
IL (intermediate language) code, 429
image collections, deep zooming, 337–339
Image control, 74
image pyramids, creating, 337–339
images, handling with UserControl, 399–400
implementing interfaces, 342–343
Implementing two event handlers listing (23.22), 515
importing videos in Expression Encoder, 226–227
Infragistics, 552
inheritance, 180
hierarchy, 291
methods, overriding, 447
Initialization code listing (16.12), 331
initialization parameters (JavaScript), passing, 453–454
InitializeComponent method, stepping through, 461
Initializing the ColorBrushes class listing (18.13), 374
Initializing the TextBoxes listing (18.17), 379
InkPresenter control, 327–328, 332–335
inputting text, 317–319
installing
Expression Blend, 54
framework unit tests, 541
Silverlight documentation, 18
instances
Exception, 521
JavaScript, 137
XAML media instances. creating, 397–399
integer types, 163
Integrated Development Environments (IDEs), Visual Studio, 457
integrating Silverlight with existing web page, 115–116, 143–149
animated logo, creating, 117–118
results, testing, 119
XAP files
referencing from external web servers, 119–120
retrieving, 117
interactivity, adding to Thumbnails project, 181–185
interfaces
implementing, 342–343
thumbnails viewer, creating, 391–393
user interfaces, updating, 486–488
intermediate language (IL) code, 429
interoperability, 261
JavaScript in .NET environment, 261–269, 289
interpreter, 141
isolated storage, 190–193
multibrowser compatibility, 197
reading from, 195
writing to, 195–197
items, scrolling, 422–425
ItemsControls class, 335–337
ItemsSource properties, adding, 393–396
ItemsSourceProperty DP listing (19.5), 395
Januszewski, Karsten, 549
Java applets, 7–8
JavaScript, 261
arrays, 452
built-in objects, 133
case sensitivity, 131
comments, writing, 130
detecting, 150
DHTML, 6
errors, handling, 524
event handlers, 135–136
multiple event handlers, registering, 440–441
functions, 132
global object, 137–138
history of, 5
initialization parameters, passing, 453–454
instances, 137
JSON, creating objects, 139–140
libraries, 133
literal notation, 138–139
methods, calling from .NET, 267–269
modifying web pages during runtime, 150
.NET environment
data exchange, 445–452
events, attaching to HTML elements, 454–457
events, handling, 263–267
interoperability, 261–269, 289
methods, calling from, 269
prototype property, 132
scripts, loading in web page, 141–142
Silverlight
applications, initializing, 453–454
elements, finding in, 441–443
integrating in existing web page, 143–149
version number, detecting, 149
simple values, 452
statements, 130
static members, 140
this keyword, 142–143
types, 132
variables, 131
null value, 135
undefined values, 134
JavaScriptDotNet application, 439
multiple JavaScript event handlers, registering, 440–441
Silverlight elements, finding, 441–443
JavaScriptDotNet application, JavaScript Code listing (14.7), 265
JavaScriptDotNet application, Page class listing (14.4), 264
JSON (JavaScript Object Notation), 138
objects, creating, 139–140
strings, decoding, 510–514
Kaxaml, testing XAML markup, 29–30
key frames, 49
keyboard shortcuts for Expression Blend, 60
killing
loops, 170
processes, 528–530
Kinney, Adam, 553
launching Expression Blend, 54
Laying out elements in a Grid listing (15.6), 305
layouts
flow layout, StackPanel, 301–302
Grid, 302–307
panels, 296–307
ScrollViewer, 307–308
leader video segments, adding in Expression Encoder, 230
Lee, Gigi, 335
libraries, 133
class libraries, creating, 429–432, 434
DLLs, checking, 432
third-party, 552
LinearGradientBrush
creating in Expression Blend, 61–62
gradient vector, changing, 62
LINQ (Language Integrated Query)
filtering, 476
XML files, reading, 473–476
ListBox markup listing (18.15), 378
ListBoxes, 372–376
literal notation, 138–139
Live Control, embedding HTML applications in
existing web pages, 254
Loaded event, 470
Loaded event and companion method listing (22.5), 470
XML files, 467–480
Zip files, 480–483
Loading the Zip file listing (22.16), 482
LoadMediaFile method, 471–472
LoadMediaFile method listing (22.6), 471
LoadUsers method listing (22.25), 490
LoadZipFile method, 482
LoadZipFile method listing (22.17), 482
lockless controls, templating, 356–361
logical operators, 173
login dialogs, adding to Thumbnails application, 270–289
login link, adding to XAML user interfaces, 280–282
LoginLink_Click event handler, 281
LongDescription DP, 409
LongDescription DP listing (19.21), 409
lookless objects, 405
Looping through the photos, placing requests
listing (23.18), 513
looping videos, 80–81
loops
do_while, 170
for, 167
foreach, 168–169
if_then_else, 166
killing, 170
while, 169–170
Macintosh computers, debugging running applications, 465
Making a LINQ Query listing (22.8), 474
managed codes, 155
manually defined columns, DataGrid, 383
markup extensions, 346–347
mathematical operators, 172
MatrixTransform, 43–44
media
adding to scenes, 74–79
files, moving with UserControl, 401–402
instances, creating in XAML, 397–399
presenting, 324
removing information from applications, 467–468
transforms, adding, 86
videos
build actions, checking, 282–283
cropping in Expression Encoder, 229
hiding from mouse input, 83
importing with Expression Encoder, 226–227
overlays, adding, 242
players, allowing viewers to select, 245–250
profiles, 227–228
reflection, adding, 104
size of, changing in Expression Encoder, 228
writing with, 84–85
web-based, 86–87
Media class
creating, 388–390
extending, 390–391
MediaDataSource collection listing (19.10), 397
MediaElement control, 387
MediaEx class
creating, 390–391
extending, 481
MediaEx class listing (19.2), 390–391
MediaExCollection class, creating, 391
MediaExCollection class listing (19.3), 391
_mediaFile_Loaded event handler, 477
_mediaFile_Loaded event handler listing (22.10), 477
MediaFileLoadedEventArgs class listing (22.4), 470
MediaFiles folder, creating in ClientBin, 401
mediaFile_DownloadProgressChanged event handler, 486
mediaFile_DownloadProgressChanged handler listing (22.22), 486
MediaInfo class listing (24.3), 531
MediaInfo DP, 410
MediaInfo DP listing (19.22), 409
MediaInfoDisplay constructor listing (19.17), 406
MediaInfoDisplay control
creating, 405–414
default template, creating for, 415–417
parts, handling, 411–413
scenes, adding to, 418–419
states, handling, 410–411
templates
applying, 413–414
creating, 419–420
test data
adding, 417–418
removing, 421
transitions, creating, 420–421
using, 417–422
wiring up, 421–422
MediaInformationFile class, 469–472
MediaPlayer ASP.NET control, 538–541
MediaPlayer ASP.NET control with chapters listing (24.15), 540
MediaPlayer ASP.NET control with event handler listing (24.14), 540
MediaType enumeration and Media class listing (19.1), 388–389
Media_Loaded event handler, 487
Media_Loaded event handler listing (22.24), 487
media_MouseLeftButtonDown event handler listing (19.14), 403
MediaInfoDisplay custom control
blueprints, creating, 405–406
DependencyProperties, adding, 408–410
parts, specifying, 407
shells, creating, 406–410
states, specifying, 407
members (.NET), creating scriptable members, 261–262
Metadata panel (Expression Encoder), 232–233
metainformation, 407
Method AddUser in Page class listing (14.21), 278
Method createDelegate listing (14.29), 286
method execution context, 142–143
Method GetColor listing (16.13), 331
Method OnLoginClicked listing (14.24), 281
Method saySomething listing (14.8), 267
Method saySomething listing (21.6), 442
Method ToString listing (21.15), 447
Method TryFindResource overloaded for the Application class listing (24.26), 548
Method ValidateUser in Page class listing (14.22), 279
methods
ConvertBack, 368
createDelegate, 286
DoWork, 527
extension methods, 542–544
TryFindResource extension method, 544–548
ExtractResponse, 509
generics, 436–437
GetColor, 331
GetProperty, 452
GetUser, 277
GoToState, 410
handleNewUserClicked, 289
handleSubmitClicked, 288
inherited methods, overriding, 447
InitializeComponent, 461
JavaScript methods, calling from .NET, 267–269
LoadMediaFile, 471–472
LoadZipFile, 482
.NET methods, calling from JavaScript, 269
Object class, overriding, 292
OnLoginClicked, 281
overloading, 185–186
ResponseCallback, 508
saySomething, 442
Scriptable, 454–457
test methods, 449
TestTryFindResourceInLayoutRoot, 543
Methods AddUser listing (14.18), 276
Methods Equals and GetHashCode listing (14.15), 274
Methods GetUser listing (14.20), 278
Methods LoadUsers listing (14.16), 275
Methods SaveUsers listing (14.17), 276
Methods ValidateUser listing (14.19), 277
MFC (Microsoft Foundation Classes), 155
Microsoft Silverlight Streaming servers, publishing on, 250–252
Microsoft Visio, converters, 552
mixing colors, 67–69
Modified method TryFindResource listing (24.25), 547
Modified test div element listing (21.24), 455
Modified TryFindResource method listing (24.19), 545
modifying paths with splines, 93
Modifying the Binding listing (24.7), 535
Modifying the DoWork method listing (24.1), 528
multiple JavaScript event handlers, registering, 440–441
multiple users, handling, 274–277
MultiScaleImage control, deep zooming, 339
multithreading programming, 509
MyDate class, 446
changing, 430–431
defining, 24–25
UserControl, adding, 397
using directive, 176–177
navigating property paths, 51–52
.NET, 154
code, obfuscation, 530
deprecated functionality, 154
events
catching, 285–287
HTML elements, attaching to, 454–457
JavaScript, handling in, 263–267
HTML pages, accessing, 443–445
JavaScript
calling methods from, 267–269
data exchange, 445–452
interoperability, 261–269, 289
methods, calling from JavaScript, 269
objects, 180
Silverlight applications, registering with, 262–263
System.Windows.Browser namespace, availability, 262
RegisterScriptableObject method, 262–263
ScriptableMember attribute, 261–262
types, 163
converting to other types, 165
floating point types, 164–165
integer types, 163
versions, 154
New button listing (14.5), 264
New event handler handleCounterTicked listing 21.17), 449
New event handler HtmlButton_Click listing 21.27), 456
new keyword (JavaScript), 132
New method ToString listing (21.16), 449
New SizeSlider listing (18.4), 366
New SolidColorBrush listing (24.23), 547
nonsquare shapes, clipping paths, 94–95
notifications, binding errors, 367–368
Notifying the user and getting the stream listing 23.12), 510
null value (JavaScript), 135
obfuscation, .NET code, 530
Object class, 292
background parameter, 110
height attribute, 109
id attribute, 109
onerror parameter, 110
onload parameter, 110
type attribute, 109
windowless parameter, 110
objects
Application object, 434–435
binding to, 535–536
collections, storing in, 342–343
data objects
writing to, 366–367
global objects, 137–138
inspecting, 462
JavaScript, 452
lookless objects, 405
.NET objects, registering, 262–263
User objects, extending, 270–274
value coercion, 321–322
Objects and Timeline category (Style class), 351
ObservableCollection, 374
obtaining web space, 120–121
FTP client, configuring, 122–123
web server requirements, 121
onerror parameter (object tag), 110
OnItemsSourceChanged event handler listing (19.4), 394
online resources, XAML resources, 550–551
onload parameter (object tag), 110
OnLoginClicked method, 281
OnLongChanged event handler listing (19.20), 408
OnSelectionChanged helper method listing (19.8), 396
OOP (object-oriented programming), 175
inheritance, 180
polymorphism, 32
static members, 140
opacity, setting, 71
Opacity property, 50
opening Solution Explorer, 160
operators
conditional, 173
logical, 173
mathematical, 172
options, setting in Expression Encoder, 224–225
overlays
adding to videos, 242
advanced properties, setting, 242
XAML overlays, adding to videos, 243–244
overloading methods, 185–186
Overriden method ToString listing (14.12), 271
overriding
inherited methods, 447
object class methods, 292
packing
exceptions, 520–521
panels, 296–307
ThumbnailsViewerControl, 391–393
Packing and re-throwing an exception listing (23.27), 521
Page class, modifying, 278–280
Page_Loaded event handler, 477
Page_Loaded event handler listing (22.9), 477
panels, 296–307
Canvas, 298–301
Expression Blend, 57–58
Metadata panel, 232–233
Expression Encoder, 225
Grid, 302–307
StackPanel, 301–302
parameters, passing, 470
parts, custom controls
handling, 411–413
specifying, 407
Parts and states listing (19.18), 407
parameters, 470
standard data formats, 448–449
Passing initialization parameters in JavaScript listing (21.21), 453
passwords, storing on web clients, 270
Path Markup Syntax, 95
paths
clipping paths, 94–95
creating, 92
in XAML, 95
modifying with splines, 93
shapes, combining, 93–94
Paths control, 387
pausing videos, 82–83
Pencil tool, 92
photographs, sending for requests, 513–514
placing POST requests, 516–517
playing videos, 82–83
pop-up controls, 310–311
POST requests, placing, 516–517
predefined color listing, 68
presenting
data, ItemsControl, 335–337
media, 324
text, 317–319
preventing HTML page access, 445
Preview tab UserControl, 399
primitives, 387
priorities, property setters, 349–350
processes, killing, 528–530
profiles (Expression Encoder), 227–228
programming, multithreading programming, 509
progressive downloads, 240
project files, 58
Project panel (Expression Blend), 58–59
projects
classes, moving, 430
creating, 56
web site projects, debugging, 463
properties, 178–179
Application object, 435
attached properties, 305–307
attaching, 26
CustomTimestamp, 446
DataContex, setting, 370–371
DependencyProperties, 393–396
adding to, 408–410
LongDescription DP, 409
MediaInfo DP, 410
registration, 394
SelectedItem DependencyProperty, 395–396
ShortDescription DP, 408
DescriptionPanelPart, 411–412
Exception instance, 521
ItemsSource, adding, 393–396
resetting to default value, 64
setting in XAML, 30–31
stretch, 83
User class, 270
UserControl, 98–101
VideoBrush, 84–85
Properties panel (Expression Blend), 60
Property CustomTimestamp listing (21.12), 446
Property in Application object listing (20.10), 435
property paths, navigating, 51–52
property setters, 348–350
protecting source code, 530
prototype property (JavaScript), 132
proxies, client-side, 496
public .NET members, creating scriptable public members, 261–262
Publish Web Site dialog, 457
publishing
on Microsoft Silverlight Streaming servers, 250–252
videos on website, 240–241
websites with Visual Studio, 457–458
RadialGradientBrush, 63
RadioButton control, 320
raising events, 187
CounterTicked event, 264–265
SelectionChanged event, 403–405
raster graphics, 72
re-throwing exceptions, 519–521
Re-throwing an exception listing (23.25), 520
reading
XML files. LINQ, 473–476
Zip files, 483–485
Reading the string listing (23.15), 511
Rectangle control, 387
recursion, implementing unit testing, 545–548
redefining equality operators, 272
Redefining the equality operators listing (14.14), 272
refactoring, 432–434
referenced assemblies, 176
References folder, 429
reflection
adding to videos, 104
creating under thumbnails, 102–104
registering multiple JavaScript event handlers, 440–441
Registering and unregistering event handler to a Silverlight element listing (21.4), 441
Registering one event handler listing (21.1), 440
Registering two event handlers listing (21.3), 441
Registering two event handlers listing (23.21), 515
RegisterScriptableObject method (.NET), 262–263
registering
DependencyProperties, 394
.NET objects with Silverlight applications, 262–263
Release version
creating, 458–459
Debugged version, comparing, 458
RenderTransform property, 37–39
RepeatButtons control, 319–320
disabling, 423
event handlers, 423
styling, 427–428
templates
binding, 427
creating, 425–428
testing, 427
transitions, changing, 426–427
requests
cross-domain requests, placing, 499–503
Flickr
preparing for, 504–508
sending to, 504–508
pictures, sending for, 513–514
POST requests, placing, 516–517
security checks, 500
sending, 471–472
triggering, 477
WCF, sending to, 488–497
requirements for Silverlight, 11, 16–17
resetting Blend properties to default value, 64
ResourceDictionaries, 343–344
resources
App.xaml file, storing in, 347–348
Blend expression, moving in, 354
brushes, storing in, 345
code-behind, using in, 345
data objects, creating in, 365–366
Silverlight-related blogs, 553
storing, 343–344
Style class, 348
creating, 348–349
creating in Expression Blend, 350–351
editing in Expression Blend, 351–352
priority system, 349–350
using, 349
XAML
creating and purchasing, 549–552
defining in, 344
online resources, 550–551
using in, 345–347
ResponseCallback method, 508
ResponseCallback method listing (23.10), 509
responses
decoding, 509–510
obtaining, 472–473
third-party services, handling, 508–514
restrictions on cross-domain requests, 502–503
retrieving JavaScript initialization parameters, 453–454
reusable UI elements, 405
reusing unit tests, 549
reversing storyboards, 206
rich interactive applications, 499
RotateTransform, 39–40
rotating animations, 46–48
Roxio Buzz, 223
running DataFile classes on servers, 489–491
running applications, debugging, 464–465
SaveUsers method, 275–276, 490
SaveUsers method listing (22.26), 491
saving users, 275–276
saySomething method, 442
Scalable Vector Graphics SVG, 552
scale animations, 49–50
scenes
composing in XAML, 32–34
dragging Canvas class, 298–301
drawing applications, preparing, 328–330
MediaInfoDisplay control, adding, 418–419
scrollbars, adding, 97
schema, 24
script commands, firing in Expression Encoder, 254–256
scriptable classes, creating, 263–264
Scriptable method, 454–457
scriptable public .NET members, creating, 261–262
ScriptableMember attribute (.NET), 261–262
ScriptableMember listing (14.1), 262
ScriptObject class, converting, 449–452
scripts (JavaScript)
loading in web page, 141–142
wiring up, 287–288
Scrollbar control, 320–321
scrollbars
adding to a scene, 97
disabling and hiding, 308
scrolling items, 422–425
ScrollViewer in code listing (15.9), 308
ScrollViewer in XAML listing (15.8), 307
ScrollViewer property, 97
security
of web applications, 10–11
source code, protecting, 530
SelectedItem DependencyProperty, adding, 395–396
SelectedItem DP listing (19.7), 395
SelectionChanged event, 396, 403–405
SendFlickrRequests method listing (23.9), 507
sending requests, 471–472
serialization, 270–271
serialization languages, XAML, 293
servers
DataFile classes
moving to, 488–489
running on, 489–491
users, moving to, 488–489
Service Reference, updating, 527–528
service references, adding to client applications, 494–495
services
third-party services, communicating with, 503–516
WCF services
creating, 491–492
implementing, 492–494
setting
DataContext property, 370–371
initialization parameters in JavaScript, 453
Setting the data context listing (18.9), 371
Setting the first column’s width listing (18.19), 382
Setting the TextBlocks’ brushes in code listing (19.13), 402
Setting the ThumbDisplay1 listing (22.23), 487
Settings Border and Grid listing (16.8), 329
Settings Button listing (16.11), 330
Settings class, 421
Settings class listing (18.1), 364
Settings class listing (20.4), 421
Settings in resources listing (18.3), 366
Settings Popup listing (16.7), 329
SetTitleButton_Click event handler, 444
shapes
combining, 93–94
drawing, 311–313
working with in Expression Blend, 60
Shapes listing (15.10), 312
shells, creating custom controls, 406–410
ShortDescription DP, 408
ShortDescription DP listing (19.19), 408
Silverlight
applications, copying, 124–126
CSS (Cascaded Style Sheets), comparing with, 341
detecting, 114
developing, requirements, 16–17
documentation, 18
evolution of, 553
future of, 19
hardware requirements, 11
history of, 4
integrating with existing web page, 115–116, 143–149
animated logo, creating, 117–118
results, testing, 119
XAP files, retrieving, 117
XAP files, referencing from external web server, 119–120
running on multiple platforms, 9–10
tutorials, 18–19
Silverlight ASP.NET control listing (24.12), 537
Silverlight Cream blog, 553
Silverlight Streaming Servers, publishing on, 250–252
silverlightControlHost class, 443
SilverlightDraw, setting the scene listing (16.6), 328
SilverlightPad, testing XAML markup, 27–29
Simple DataGrid listing (18.18), 380
simple property syntax, 30
simple values, JavaScript, 452
SimpleUserLogin logic listing (20.9), 433
SimpleUserLogin UI listing (20.8), 433
size of videos, changing in Expression Encoder, 228
Size Slider listing (16.10), 330
SkewTransform, 42–43
skins, controls, 550–551
smooth transitions, 50
SoftwareFX, 552
solution files, 58
Solution Explorer, opening, 160
source code, protecting, 530
special configurations, binding, 531–536
splines, modifying paths, 93
stacking elements with StackPanel, 301
StackPanel
elements, stacking, 301
flow layout, 301–302
standard data formats, passing, 448–449
starting animations, 208
startup screens, adding to applications, 468–469
statements (JavaScript), 130
states, custom controls
handling, 410–411
specifying, 407
States category, modifying, 358–359
static members, 140
static registrations, classes, 394
Status TextBlock listing (23.20), 515
stepping through code, 459–461
stopping animations, 208
in App.xaml file, 347–348
collections, 342–343
isolated storage, 190–193
multibrowser compatibility, 197
reading from, 195
writing to, 195–197
resources, 343–344
Storyboard to hide the cache listing (22.3), 469
storyboards, 200
reversing, 206
triggering, 201–202
streaming servers, publishing on Streaming Silverlight servers, 250–252
streaming videos, 239–240
Stretch property, 83
StringReader, creating, 512
strings, decoding JSON strings, 510–514
Style class, 348–352
Blend expression
creating in, 350–351
editing in, 351–352
creating, 348–349
Objects and Timeline category, 351
priority system, 349–350
using, 349
XAML, defining in, 348
styles, applying, 341
to RepeatButtons control, 427–428
to TextBlocks, 352–353
to Thumbnails application, 352–354
StylusDevice class, 332
subscribing to events, 189, 265–267
Swanson, Mike, 551
switch_case condition operator, 170–171
synchronizing animations, 204
System.Windows.Browser namespace, .NET objects availability, 262
System.Windows.Controls.Panel class, 296–307
TabControl, 336–337
tablets, writing text with, 327–328
TargetProperty syntax, 48
TDD (Test Driven Development), 458, 541
Teach Yourself ASP.NET 2.0 in 24 Hours, 489
Telerik, 552
TemplateColumn for the Name column listing (18.21), 385
TemplateColumn for the Timestamp column listing (18.22), 385
CheckBox, 358–361
controls, binding in, 359–360
custom controls, applying, 413–414
data templates, creating, 376–378
default templates, 357–358
lockless controls, 356–361
MediaInfoDisplay control, creating for, 415–420
RepeatButtons control
binding, 427
creating, 425–428
XAML templates, purchasing, 551
TEMPMediaDataSource collection listing (19.11), 398
test applications, creating, 542–544
test data
MediaInfoDisplay control
adding to, 417–418
removing from, 421
UserControl, removing from, 401
Test div element listing (21.8), 444
Test Driven Development (TDD), 458, 541
Test initialization method listing (24.16), 543
test methods, 449
Test methods listing (21.18), 450
test pages, creating, 107–108
testing
animations in Blend, 201
applications, 480
components, 432
events, 267
RepeatButtons control, 427
Silverlight files on web server, 126
unit tests, 541
creating, 541–549
frameworks, 541
recursion, 545–548
reusing, 549
test applications, 542–544
test passes, 545
TryFindResource extension method, 544–548
video in Expression Encoder, 231–232
XAML markup
with KaXaml, 29–30
with SilverlightPad, 27–29
TestTryFindResourceInLayoutRoot method, 543
TestTryFindResourceInLayoutRoot method listing (24.17), 543
TestTryFindResourceNotFound method listing (24.22), 546
text
inputting, 317–319
presenting, 317–319
writing, 327–328
TextBlock and HyperlinkButton listing (14.23), 280
TextBlock control, 317–318, 352–353, 387
TextBox control, 318–319
TextBoxes, initializing, 379
TextBox_BindingValidationError error handler, 533
TextBox_BindingValidationError error handler listing (24.4), 533
third-party controls, 552
third-party libraries, 552
third-party plugins, 7–8
third-party services, communicating with, 503–506, 508–514, 516
third-party web technologies, running on multiple platforms, 9
this keyword (JavaScript), 132, 142–143
threading context, 508
threads, 509
Three event handlers listing (21.20), 451
Three TextBlocks listing (21.19), 450
throwing exceptions, 517–521
Thumb class, 322–324
thumbnails, placing into ScrollViewer, 97–98
Thumbnails application
display frame, adding, 101–102
fonts, embedding in, 354–356
HTML events, handling, 288–289
HTML login dialogs, adding to, 283–284
interactivity, adding, 181–185
items, scrolling, 422–425
login dialogs, adding to, 270–289
media files, build actions, 282–283
media information, removing, 467–468
.NET event, catching, 285–287
reflection, adding under thumbnails, 102–104
scripts, wiring up, 287–288
Silverlight animations, adding, 210–220
startup screen, adding, 468–469
styling, 352–354
web projects, adding to, 282
Thumbnails constructor listing (14.28), 2851
Thumbnails prototype listing (14.30), 286
thumbnails viewer
creating, 387–396
data objects, creating, 388–391
DataTemplate, designing for, 399–401
images, handling, 399–400
interface, creating, 391–393
media files, moving, 401–402
namespaces, adding, 397
Preview tab, 399
real data, connecting to, 403
SelectionChanged event, raising and handling, 403–405
videos, handling, 400–401
XAML media instances, creating, 397–399
ThumbnailsViewerControl, packing, 391–393
ThumbnailsViewerControl_LayoutUpdated event handler listing (20.7), 424
ThumbnailsViewer_SelectionChanged event handler listing (19.16), 404
timelines, 200–201
timeouts, 522
ToggleButton control, 319–320
TOS (terms of service), Flickr, 503
ToString method, 270–271, 447–448
trailer video segments, adding in Expression Encoder, 230
TransformGroup, composing transforms, 45
transforms, 37
adding to media, 86
composing, 45
creating, 89
MatrixTransform, 43–44
RotateTransform, 39–40
SkewTransform, 42–43
TranslateTransform, 40
transitions
MediaInfoDisplay control, creating, 420–421
RepeatButtons control, changing, 426–427
Translate animation, 212–220
TranslateTransform, 40
transparency, setting, 69–70
triggering
requests, 477
storyboards, 201–202
TryFindResource extension method, 544–548
TryFindResource method listing (24.18), 544
Trying to register two event handler listing (21.2), 440
tutorials for Silverlight, 18–19
Two event handlers listing (21.5), 442
Two events and a helper method listing (23.7), 506
Two methods listing (24.21), 546
Two new classes listing (23.5), 505
Two new classes listing (23.6), 505
Two new properties listing (14.11), 270
Two new properties listing (22.15), 481
type attribute (object tag), 109
types
anonymous, 476
JavaScript, 132
.NET, 163
converting to other types, 165
floating point types, 164–165
integer types, 163
UIElement class, 292–293
UIs (user interfaces), updating, 486–488, 514–516
Undefined resource listing (17.5), 347
undefined values (JavaScript), 134
unhandled exceptions, catching, 522–524
unit tests, 541
creating, 541–549
framework, installing, 541
recursion, implementing, 545–548
reusing, 549
test applications, creating, 542–544
test passes, 545
TryFindResource extension method, 544–548
unmanaged code, 155
Updated Border listing (18.5), 367
updating
client applications, 494–497
Service Reference, 527–528
user interfaces, 486–488, 514–516
User class, 517
constructors, 271–272
properties, 270
ToString method, 270–271
User class constructor listing (23.23), 517
user controls, 98, 100–101, 405
user interfaces
describing with XML, 23
user objects, extending, 270–274
UserControl
data objects, creating, 388–391
DataTemplate, designing for, 399–401
images, handling, 399–400
ItemsSource property, adding, 393–396
media files, moving, 401–402
namespaces, adding, 397
Preview tab, 399
real data, connecting to, 403
SelectionChanged event, raising and handling, 403–405
test data source, 401
videos, handling, 400–401
XAML media instances, creating, 397–399
UserInformation class, 492
UserInformation class listing (22.27), 492
users
comparing, 272–274
saving, 275–276
servers, moving to, 488–489
Using a DatePicker and catching errors, C# code listing (16.5), 327
Using a DatePicker and catching errors, XAML markup listing (16.4), 327
Using a generic class listing (20.15), 437
Using a GridSplitter listing (16.3), 324
Using a resource in code listing (17.3), 345
using directive, 176–177
using statements, 183
Using the Bubbly style listing (24.27), 551
Using the DoubleToThicknessConverter listing (18.8), 369
Using the explicit data context in the Border listing (18.10), 371
Using the explicit data context in the Slider listing (18.11), 371
ValidateUser method, 277, 493–495
ValidateUser method listing (22.28), 493
ValidateUserCompleted event handler, 496
ValidateUserCompleted event handler listing (22.32), 496
validation errors, handling, 533–534
Validation properties listing (24.5), 534
value coercion, 321–322
values
bindings, converting in, 368–369
JavaScript, 131
variables
inspecting, 462–463
JavaScript, 452
modifying, 462–463
vector graphics, 72–73
versioning
application assemblies, 434
components, 434
versions of .NET, 154
VideoBrush property, painting videos with, 84–85
VideoPlayer_Ended event handler, 539
VideoPlayer_Ended event handler listing (24.13), 539
videos
auto-play, disabling, 80
captions, adding, 234
chapters, adding, 233–234
cropping in Expression Encoder, 229
encoding for Silverlight, 235–236
full screen, enabling, 237
handling, UserControl, 400–401
hiding from mouse input, 83
importing with Expression Encoder, 226–227
looping, 80–81
overlays
adding, 242
advanced properties, setting, 242
XAML overlays, adding, 243–244
pausing, 82–83
players, allowing viewer to select, 245–250
playing, 82–83
profiles, 227–228
publishing on website, 240–241
reflections, adding, 104
size of, changing in Expression Encoder, 228
streaming, 239–240
writing with, 84–85
visibility, 177
Visual Studio. See also Visual Studio 2008 17
applications
debugging, 458–465
refactoring, 430–434
Debug toolbar, 460
fonts, embedding in, 356
installing, 54
websites, publishing directly from, 457–458
Visual Studio 2008, 17
installing, 156
Intellisense, 162
Silverlight 2 applications, creating, 156–157, 162
compilation errors, finding, 158
Silverlight project files, 160–161
Web Site project files, 159
Walking the tree listing (17.4), 346
walking the tree of elements, 346–347
WCF (Windows Communication Foundation)
requests, making, 488–497
services
creating, 491–492
implementing, 492–494
WCF Unleashed, 489
web applications, security of, 10–11
web browsers, caching applications, 439
web clients
JavaScript, 261
passwords, storing on, 270
web projects, adding applications to, 282
web servers
connecting to, 123
FTP client, configuring, 122–123
requirements, 121
Silverlight files, testing, 126
web space, obtaining, 120–121
web sites
debugging, 463
publishing with Visual Studio, 457–458
web space, obtaining, 120–121
web-based media, 86–87
webpages, modifying during runtime, 150
websites, placing on hard disks, 282
while loop, 169–170
windowless parameter (object tag), 110
Windows Presentation Foundation, 345
wiring up scripts, 287–288, 421–422
WPF/E (Windows Presentation Foundation Everywhere), 3
writing
to data objects, bindings, 366–367
to isolated storage, 195–197
text, 327–32
XAML (eXtensible Application Markup Language), 21–23
Border element, 309
code-behind, comparing with, 293–296
elements, 294
files, converting to, 551–552
Grid layout, 303
login links, adding to user interfaces, 280–282
markup, testing
with KaXaml, 29–30
with SilverlightPad, 27–29
media instances, creating in, 397–399
overlays, adding to videos, 243–244
paths, 95
Popup, 310
properties, setting, 30–311
resources
creating, 549–552
defining in, 344
online resources, 550–551
purchasing, 549–552
using in, 345–347
scenes, composing, 32–34
ScrollViewer, 307
StackPanel, 301
Style class, defining in, 348
TabControl, 336
templates, purchasing, 551
TextBlock control, 317
XAML Archive, 551
XAML Elements listing (15.1), 294
XAML scene for dragging listing (15.3), 298–299
XAML test markup listing (21.9), 444
Xceed, 552
XML (eXtensible Markup Language)
comments, adding, 27
data sources, 386
document characteristics, 22
files
loading, 467–480
reading, LINQ, 473–476
namespaces, 23–25
user interfaces, describing, 23
XML Media Information File listing (22.1), 468
Zip files
creating, 480
loading, 480–483
reading, 483–485
3.142.171.90