Table of Contents

      Introduction

   Part I  Fundamentals

     1  Getting Started

Embedding the Silverlight Control Manually

Letting Silverlight.js Handle the Dirty Work

Silverlight.createObject

Silverlight.createObjectEx

Putting It All Together

Understanding Your Hosting Options

source

Properties

Events

Interacting with the Silverlight Control Programmatically

The Settings Property

The Content Property

Other Members

Conclusion

     2  XAML

Elements and Attributes

The XML Namespace

Property Elements

Type Converters

Children of Object Elements

The Content Property

Items in a Collection

Attached Properties

The Relationship Between XAML and JavaScript

Interacting with Elements Defined in XAML

Generating XAML Dynamically

Conclusion

  Part II  Creating Static Content

     3  Shapes, Lines, and Curves

Basic Shapes

Rectangle

Ellipse

Polygon

Lines and Curves

Line

Polyline

Path

Geometries

Using a Geometry for Clipping

PathGeometry

GeometryGroup

Representing Geometries as Strings

Strokes

Line Caps

Line Joins

Dashes

Conclusion

     4  Text

Customizing Text Display

Basic Font Properties

Additional Customizations

Retrieving TextBlock Dimensions

Creating Rich Text Content

Run

LineBreak

Using Custom Fonts

Downloading Custom Fonts

Using the Glyphs Element

Converting Text into a Path

Conclusion

     5  Brushes and Images

SolidColorBrush

LinearGradientBrush

RadialGradientBrush

ImageBrush and Image

VideoBrush

Brushes as Opacity Masks

Conclusion

     6  Positioning and Transforming Elements

All About Canvas

Positioning Elements

Placing Elements Behind or in Front of Others

Controlling Size and Clipping

Creating Maintainable User Interfaces with Multiple Canvas Elements

Applying Transforms

RotateTransform

ScaleTransform

SkewTransform

TranslateTransform

MatrixTransform

Combining Transforms

Conclusion

Part III Making Your Content Come to Life

     7 Responding to Input Events

About Silverlight Events

Event Handlers

Attaching Event Handlers to Events

Mouse Events

Bounds and Hit Testing

More About the Mouse Pointer

Event Bubbling

Capturing the Mouse

Putting It All Together: Building a Scrollbar

Using Silverlight’s Stylus Support

Keyboard Events

The Basics

Finding Out What Keys Were Pressed

Using Full-Screen Mode

Conclusion

     8 Downloading Content on Demand

Initiating a Download

Using the Downloaded Content

Downloading Multiple Items Simultaneously in a .ZIP File

Displaying a Progress Bar

A Simple Progress Bar

Progress Bar Customizations

Conclusion

     9 Animation

Introducing Animations

Performing Animation “By Hand”

Performing Animation with Silverlight Support

Interacting with Animations from JavaScript

Functions for Controlling a Storyboard

The Completed Event

Tweaking the Animation Timeline

BeginTime

SpeedRatio

AutoReverse

RepeatBehavior

FillBehavior

More About Storyboards

Specifying the Target Property

Specifying the Target Object

Treating a Storyboard Like an Animation

Keyframe Animations

Linear Keyframes

Spline Keyframes

Discrete Keyframes

Conclusion

    10 Audio and Video

Playing Audio and Video with MediaElement

The Source Property

Visual Effects

Audio-Specific Features

Video-Specific Features

Progressive Download Versus Streaming

Controlling Audio and Video with JavaScript

Changing the Media’s State

Basic Media Events

Positioning the Audio or Video

Using Timeline Markers

Building a Media Player User Interface

Using Expression Encoder

Conclusion

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.187.233