Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: Introducing Silverlight
Silverlight Design Tools
Visual Studio vs. Expression Blend
Understanding Silverlight Websites
Creating a Stand-Alone Silverlight Project
Creating a Simple Silverlight Page
Adding Event-Handling Code
Testing a Silverlight Application
Creating an ASP.NET-Hosted Silverlight Project
ASP.NET Controls That Render Silverlight Content
Mixing ASP.NET Controls and Silverlight Content
Silverlight Compilation and Deployment
Compiling a Silverlight Application
Deploying a Silverlight Application
Silverlight Core Assemblies
Silverlight Add-on Assemblies
Assembly Caching
The HTML Test Page
Sizing the Silverlight Content Region
Silverlight Parameters
Alternate Content
Creating a Friendly Install Experience
The Mark of the Web
The Last Word
Chapter 2: XAML
XAML Basics
XAML Namespaces
The Code-Behind Class
Properties and Events in XAML
Simple Properties and Type Converters
Complex Properties
Attached Properties
Nesting Elements
Events
The Full Eight Ball Example
XAML Resources
The Resources Collection
The Hierarchy of Resources
Accessing Resources in Code
Organizing Resources with Resource Dictionaries
Element-to-Element Binding
One-Way Binding
Two-Way Binding
The Last Word
Chapter 3: Layout
The Layout Containers
The Panel Background
Borders
Simple Layout with the StackPanel
Layout Properties
Alignment
Margins
Minimum, Maximum, and Explicit Sizes
The WrapPanel and DockPanel
The WrapPanel
The DockPanel
The Grid
Fine-Tuning Rows and Columns
Nesting Layout Containers
Spanning Rows and Columns
The GridSplitter
Coordinate-Based Layout with the Canvas
Layering with ZIndex
Clipping
Custom Layout Containers
The Two-Step Layout Process
The UniformGrid
Sizing Pages
Scrolling with the ScrollViewer
Scaling with the Viewbox
Full-Screen Mode
The Last Word
Chapter 4: Dependency Properties and Routed Events
Dependency Properties
Defining and Registering a Dependency Property
Dynamic Value Resolution
Attached Properties
The WrapBreakPanel Example
Routed Events
The Core Element Events
Event Bubbling
Handled (Suppressed) Events
An Event Bubbling Example
Mouse Handling
Right-Clicks
Double and Triple Clicks
Mouse Movements
The Mouse Wheel
Capturing the Mouse
A Mouse Event Example
Mouse Cursors
Keyboard Handling
Key Presses
Key Modifiers
Focus
The Command Model
Building a Command
Connecting a Command
The Last Word
Chapter 5: Elements
The Silverlight Elements
Static Text
Font Properties
Underlining
Runs
Wrapping Text
Trimming Text
Character Spacing
Images
Image Sizing
Image Errors
Content Controls
The Content Property
Aligning Content
Buttons
The HyperlinkButton
The ToggleButton and RepeatButton
The CheckBox
The RadioButton
Tooltips and Pop-Ups
Customized Tooltips
The Popup
Items Controls
The ListBox
The ComboBox
The TabControl
Text Controls
The TextBox
The PasswordBox
The AutoCompleteBox
The RichTextBox
Creating a Text Editor
Using Interactive Elements in a RichTextBox
The RichTextBlock
Range-Based Controls
The Slider
The ProgressBar
Date Controls
The Last Word
Chapter 6: The Application Model
The Application Class
Accessing the Current Application
Application Properties
Application Events
Application Startup
Initialization Parameters
Application Shutdown
Unhandled Exceptions
Custom Splash Screens
Binary Resources
Placing Resources in the Application Assembly
Placing Resources in the Application Package
Placing Resources on the Web
Class Library Assemblies
Using Resources in an Assembly
Downloading Assemblies on Demand
Supporting Assembly Caching
The Last Word
Chapter 7: Navigation
Loading User Controls
Embedding User Controls in a Page
Hiding Elements
Managing the Root Visual
Retaining Page State
Browser History
Child Windows
Designing a ChildWindow
Showing a ChildWindow
The Frame and Page
Frames
URI Mapping
Forward and Backward Navigation
Hyperlinks
Pages
Navigation Templates
Custom Content Loaders
Authentication and Navigation
Creating a Custom Content Loader
Using the Custom Content Loader
The Last Word
Chapter 8: Shapes and Transforms
Basic Shapes
The Shape Classes
Rectangle and Ellipse
Sizing and Placing Shapes
Sizing Shapes Proportionately with a Viewbox
Line
Polyline
Polygon
Line Caps and Line Joins
Dashes
Paths and Geometries
Line, Rectangle, and Ellipse Geometries
Combining Shapes with GeometryGroup
Curves and Lines with PathGeometry
The Geometry Mini-Language
Clipping with Geometry
Transforms
Transforming Shapes
Transforms and Layout Containers
A Reflection Effect
Perspective Transforms
The PlaneProjection Class
Applying a Projection
Exporting Clip Art
Expression Design
Conversion
Save or Print to XPS
The Last Word
Chapter 9: Brushes, Bitmaps, and Printing
Brushes
The LinearGradientBrush Class
The RadialGradientBrush Class
The ImageBrush
Transparency
Opacity Masks
Making the Silverlight Control Transparent
Pixel Shaders
BlurEffect
DropShadowEffect
ShaderEffect
The WriteableBitmap Class
Generating a Bitmap
Capturing Content from Other Elements
Printing
Printing a Single Element
Printing Over Multiple Pages
Bitmap and Vector Printing
Creating a Print Preview
The Last Word
Chapter 10: Animation Basics
Understanding Silverlight Animation
The Rules of Animation
Creating Simple Animations
The Animation Class
The Storyboard Class
Starting an Animation with an Event Trigger
Starting an Animation with Code
Configuring Animation Properties
Animation Lifetime
Simultaneous Animations
Controlling Playback
Animation Easing
Using an Easing Function
Easing In and Easing Out
Easing Function Classes
Animation Performance
Desired Frame Rate
Hardware Acceleration
Independent Animations
The Last Word
Chapter 11: Advanced Animation
Animation Types Revisited
Animating Transforms
Animation Perspective Projections
Animating Brushes
Animating Pixel Shaders
Key-Frame Animation
Animations in Code
The Main Page
The Bomb User Control
Dropping the Bombs
Intercepting a Bomb
Counting Bombs and Cleaning Up
Encapsulating Animations
Page Transitions
The Base Class
The Wipe Transition
Frame-Based Animation
The Last Word
Chapter 12: Sound, Video, and Deep Zoom
Supported File Types
The MediaElement
Controlling Playback
Handling Errors
Playing Multiple Sounds
Changing Volume, Balance, and Position
Playing Video
Trick Play
Media Commands
Client-Side Playlists
Server-Side Playlists
Progressive Downloading and Streaming
Adaptive Streaming
Advanced Video Playback
Video Encoding
Encoding in Expression Encoder
Markers
VideoBrush
Video Effects
Low-Latency Sound
Play a Sound with SoundEffect
Changing Playback Settings
Overlapping Sounds with SoundEffectInstance
Looping Audio
Webcam and Microphone Input
Accessing a Capture Device
Basic Webcam Support
Recording Audio Snippets
Deep Zoom
Creating a Deep Zoom Image Set
Using a Deep Zoom Image Set in Silverlight
The Last Word
Chapter 13: Silverlight 3D
Understanding 3D in Silverlight
Adding Assembly References
Enabling 3D in a Silverlight Project
Basic 3D Drawing
The 3D Coordinate System
Filling the Vertex Buffer
Positioning the Camera
Configuring the BasicEffect
Drawing the Scene
Backface Culling
Scaling Your Drawing
Complex Objects and Textures
Drawing a Cube
Adding Textures
Lighting an Object
Creating Multiple Objects
Using Models
Movement and Animation
Moving a Shape
Rotating a Shape
Shape Animations
Rotating and Moving the Camera
The Last Word
Chapter 14: Styles and Behaviors
Styles
Defining a Style
Applying a Style
Dynamic Styles
Style Inheritance
Organizing Styles
Automatically Applying Styles by Type
Style Binding Expressions
Behaviors
Getting Support for Behaviors
Triggers and Actions
Creating a Behavior
Finding More Behaviors
The FluidMoveBehavior
The Last Word
Chapter 15: Control Templates
Template Basics
Creating a Template
Reusing Control Templates
The ContentPresenter
Template Bindings
Setting Templates Through Styles
Reusing Colors
The Parts and States Model
Understanding States with the Button Control
Showing a Focus Cue
Transitions
Understanding Parts with the Slider Control
Layout Transitions
Creating Templates for Custom Controls
Planning the FlipPanel Control
Creating the Solution
Starting the FlipPanel Class
Adding the Default Style with Generic.xaml
Choosing Parts and States
Starting the Default Control Template
The FlipButton Control
Defining the State Animations
Wiring Up the Elements in the Template
Using the FlipPanel
Using a Different Control Template
The Last Word
Chapter 16: Multithreading
Understanding Multithreading
The Goals of Multithreading
The DispatcherTimer
The Thread Class
Marshaling Code to the User Interface Thread
Creating a Thread Wrapper
Creating the Worker Class
Using the Thread Wrapper
Cancellation Support
The BackgroundWorker
Creating the BackgroundWorker
Running the BackgroundWorker
Tracking Progress
Supporting Cancellation
The Last Word
Chapter 17: Browser Integration
Interacting with HTML Elements
Getting Browser Information
The HTML Window
Popup Windows
Inspecting the HTML Document
Manipulating an HTML Element
Handling JavaScript Events
Code Interaction
Calling Browser Script from Silverlight
Calling Silverlight Methods from the Browser
Instantiating Silverlight Objects in the Browser
Combining Silverlight and HTML Content
Sizing the Silverlight Control to Fit Its Content
Placing the Silverlight Control Next to an HTML Element
Securing HTML Interoperability
The Last Word
Chapter 18: Out-of-Browser Applications
Understanding Out-of-Browser Support
Creating an Out-of-Browser Application
Installing an Out-of-Browser Application
Customizing Icons
Tracking Application State
Removing and Updating an Application
Silent Installation
Out-of-Browser Application Features
The WebBrowser Control
Notification Windows
Controlling the Main Window
Elevated Trust
Installing an Elevated-Trust Application
The Abilities of an Elevated-Trust Application
Window Customization
Child Windows
COM
P/Invoke
Elevated-Trust Applications in the Browser
The Last Word
Chapter 19: ASP.NET Web Services
Building Web Services for Silverlight
Creating a Web Service
Adding a Service Reference
Calling the Web Service
Configuring the Web Service URL
Using a Busy Indicator
Web Service Data Types
Custom Data Classes
Web Service Type Sharing
More Advanced Web Services
Cross-Domain Web Service Calls
Monitoring the Network Connection
Using ASP.NET Platform Services
WCF RIA Services
Duplex Services
Configuring the Service
The Interfaces
The Service
The Client
The Last Word
Chapter 20: Data Binding
Binding to Data Objects
Building a Data Object
Displaying a Data Object with DataContext
Storing a Data Object as a Resource
Null Values and Failed Bindings
Editing with Two-Way Bindings
Change Notification
Debugging a Data Binding Expression
Building a Data Service
Calling a Data Service
Binding to a Collection of Objects
Displaying and Editing Collection Items
Inserting and Removing Collection Items
Binding to a LINQ Expression
Master-Details Display
Validation
Error Notifications
The BindingValidationFailed Event
The Validation Class
Creating Data Objects with Built-in Validation
Data Formatting and Conversion
String Formatting
Value Converters
Formatting Strings with a Value Converter
Creating Objects with a Value Converter
Applying Conditional Formatting
Data Templates
Separating and Reusing Templates
Implicit Data Templates
More Advanced Templates
Changing Item Layout
The Last Word
Chapter 21: Data Controls
Better Data Forms
The Goal: Data Class Markup
The Label
The DescriptionViewer
The ValidationSummary
Data Annotations
Raising Annotation Errors
The Annotation Attributes
The DataGrid
Creating a Simple Grid
How Columns Are Resized and Rearranged
Defining Columns
Formatting and Styling Columns
Controlling Column Width
Formatting Rows
Row Details
Freezing Columns
Selection
Sorting
DataGrid Editing
Editing with Templates
Validation and Editing Events
The PagedCollectionView
Sorting
Filtering
Grouping
Paging
The TreeView
Filling a TreeView
A Data-Bound TreeView
The PivotViewer
Defining the PivotViewer
Navigating the PivotViewer
The Last Word
Chapter 22: File Access
Isolated Storage
The Scope of Isolated Storage
What to Put in Isolated Storage
Using Isolated Storage
Opening an Isolated Store
File Management
Writing and Reading Data
Requesting More Space
Storing Objects with XmlSerializer
Storing Application Settings
Accessing Files Outside of Isolated Storage
Reading Files with OpenFileDialog
Writing Files with SaveFileDialog
Transmitting Files with a Web Service
Dragging and Dropping Files
File Access in Elevated Trust Applications
Accessing User Files
Managing Directories and Files
Creating a Directory Tree
The Last Word
Chapter 23: Networking
Interacting with the Web
Cross-Domain Access
HTML Scraping
REST and Other Simple Web Services
Using Network Credentials
Processing Different Types of Data
XML
Services That Return XML Data
Services That Require XML Data
Services That Return SOAP Data
Services That Return JSON Data
RSS
Sockets
Understanding Sockets and TCP
Understanding Policy Files
The Policy Server
The Messaging Server
The Messenger Client
Local Connections
Sending a Message
Receiving a Message
The Last Word
Index
← Prev
Back
Next →
← Prev
Back
Next →