You are previewing Pro Silverlight 4 in VB, Third Edition.
O'Reilly logo
Pro Silverlight 4 in VB, Third Edition

Book Description

Silverlight 4 is the latest iteration of Microsoft's cross-browser technology for creating rich user experiences on the Web. Like its predecessor, Silverlight 3, it rides atop the .NET Framework for maximum ease of use and coding efficiency. The new technology carries forward much of the work that has been done before and augments it in many important respects, including support for H.264 video, major improvements to the graphics engine (including true 3D rendering), and much richer data-binding options for interfacing with other applications.

Pro Silverlight 4 in VB is an invaluable reference for professional developers wanting to discover the new features of Silverlight. Author Matthew MacDonald's expert advice guides you through creating rich media applications using Silverlight in the environment you're most productive in—no matter what the target platform. As you learn about the features that put Silverlight in direct competition with Adobe Flash, such as rich support for 2D and 3D drawing, animations, and media playback, you'll experience the plumbing of .NET and the design model of WPF through Silverlight—all of the same .NET technology that developers use to design next-generation Windows applications.

In this book, MacDonald provides a comprehensive tutorial written from professional developer to professional developer.

Table of Contents

  1. Copyright
  2. About the Author
  3. About the Technical Reviewer
  4. Acknowledgments
  5. Introduction
    1. Understanding Silverlight
      1. Silverlight System Requirements
      2. Silverlight vs. Flash
      3. Silverlight and WPF
      4. The Evolution of Silverlight
    2. About This Book
      1. What You Need to Use This Book
      2. The Silverlight Toolkit
      3. Code Samples
      4. Feedback
    3. The Last Word
  6. 1. Introducing Silverlight
    1. 1.1. Silverlight Design Tools
      1. 1.1.1. Visual Studio vs. Expression Blend
      2. 1.1.2. Understanding Silverlight Websites
    2. 1.2. Creating a Stand-Alone Silverlight Project
    3. 1.3. Creating a Simple Silverlight Page
      1. 1.3.1. Adding Event-Handling Code
      2. 1.3.2. Testing a Silverlight Application
    4. 1.4. Creating an ASP.NET-Hosted Silverlight Project
      1. 1.4.1. ASP.NET Controls That Render Silverlight Content
      2. 1.4.2. Mixing ASP.NET Controls and Silverlight Content
    5. 1.5. Silverlight Compilation and Deployment
      1. 1.5.1. Compiling a Silverlight Application
      2. 1.5.2. Deploying a Silverlight Application
      3. 1.5.3. Silverlight Core Assemblies
      4. 1.5.4. Silverlight Add-on Assemblies
      5. 1.5.5. Assembly Caching
    6. 1.6. The HTML Entry Page
      1. 1.6.1. Sizing the Silverlight Content Region
      2. 1.6.2. Silverlight Parameters
      3. 1.6.3. Alternative Content
      4. 1.6.4. Creating a Friendly Install Experience
      5. 1.6.5. The Mark of the Web
    7. 1.7. The Last Word
  7. 2. XAML
    1. 2.1. XAML Basics
      1. 2.1.1. XAML Namespaces
        1. 2.1.1.1. Core Silverlight Namespaces
        2. 2.1.1.2. Design Namespaces
        3. 2.1.1.3. Custom Namespaces
      2. 2.1.2. The Code-Behind Class
        1. 2.1.2.1. Naming Elements
    2. 2.2. Properties and Events in XAML
      1. 2.2.1. Simple Properties and Type Converters
      2. 2.2.2. Complex Properties
      3. 2.2.3. Attached Properties
      4. 2.2.4. Nesting Elements
      5. 2.2.5. Events
      6. 2.2.6. The Full Eight Ball Example
    3. 2.3. XAML Resources
      1. 2.3.1. The Resources Collection
      2. 2.3.2. The Hierarchy of Resources
      3. 2.3.3. Accessing Resources in Code
      4. 2.3.4. Organizing Resources with Resource Dictionaries
    4. 2.4. Element-to-Element Binding
      1. 2.4.1. One-Way Binding
      2. 2.4.2. Two-Way Binding
    5. 2.5. The Last Word
  8. 3. Layout
    1. 3.1. The Layout Containers
      1. 3.1.1. The Panel Background
      2. 3.1.2. Borders
    2. 3.2. Simple Layout with the StackPanel
      1. 3.2.1. Layout Properties
      2. 3.2.2. Alignment
      3. 3.2.3. Margins
      4. 3.2.4. Minimum, Maximum, and Explicit Sizes
    3. 3.3. The WrapPanel and DockPanel
      1. 3.3.1. The WrapPanel
      2. 3.3.2. The DockPanel
    4. 3.4. The Grid
      1. 3.4.1. Fine-Tuning Rows and Columns
      2. 3.4.2. Nesting Layout Containers
      3. 3.4.3. Spanning Rows and Columns
      4. 3.4.4. The GridSplitter
    5. 3.5. Coordinate-Based Layout with the Canvas
      1. 3.5.1. Layering with ZIndex
      2. 3.5.2. Clipping
    6. 3.6. Custom Layout Containers
      1. 3.6.1. The Two-Step Layout Process
        1. 3.6.1.1. MeasureOverride()
        2. 3.6.1.2. ArrangeOverride()
      2. 3.6.2. The UniformGrid
    7. 3.7. Sizing Pages
      1. 3.7.1. Scrolling with the ScrollViewer
      2. 3.7.2. Scaling with the Viewbox
      3. 3.7.3. Full-Screen Mode
    8. 3.8. The Last Word
  9. 4. Dependency Properties and Routed Events
    1. 4.1. Dependency Properties
      1. 4.1.1. Defining and Registering a Dependency Property
      2. 4.1.2. Dynamic Value Resolution
      3. 4.1.3. Attached Properties
      4. 4.1.4. The WrapBreakPanel Example
    2. 4.2. Routed Events
      1. 4.2.1. The Core Element Events
      2. 4.2.2. Event Bubbling
      3. 4.2.3. Handled (Suppressed) Events
      4. 4.2.4. An Event Bubbling Example
    3. 4.3. Mouse Handling
      1. 4.3.1. Right-Clicks
      2. 4.3.2. Mouse Movements
      3. 4.3.3. The Mouse Wheel
      4. 4.3.4. Capturing the Mouse
      5. 4.3.5. A Mouse Event Example
      6. 4.3.6. Mouse Cursors
    4. 4.4. Keyboard Handling
      1. 4.4.1. Key Presses
      2. 4.4.2. Key Modifiers
      3. 4.4.3. Focus
    5. 4.5. The Command Model
      1. 4.5.1. Building a Command
      2. 4.5.2. Connecting a Command
    6. 4.6. The Last Word
  10. 5. Elements
    1. 5.1. The Silverlight Elements
    2. 5.2. Static Text
      1. 5.2.1. Font Properties
        1. 5.2.1.1. Standard Fonts
        2. 5.2.1.2. Font Embedding
      2. 5.2.2. Underlining
      3. 5.2.3. Runs
      4. 5.2.4. Wrapping Text
      5. 5.2.5. Trimming Text
    3. 5.3. Images
      1. 5.3.1. Image Sizing
      2. 5.3.2. Image Errors
    4. 5.4. Content Controls
      1. 5.4.1. The Content Property
      2. 5.4.2. Aligning Content
    5. 5.5. Buttons
      1. 5.5.1. The HyperlinkButton
      2. 5.5.2. The ToggleButton and RepeatButton
      3. 5.5.3. The CheckBox
      4. 5.5.4. The RadioButton
    6. 5.6. Tooltips and Pop-Ups
      1. 5.6.1. Customized Tooltips
      2. 5.6.2. The Popup
    7. 5.7. Items Controls
      1. 5.7.1. The ListBox
      2. 5.7.2. The ComboBox
      3. 5.7.3. The TabControl
    8. 5.8. Text Controls
      1. 5.8.1. The TextBox
      2. 5.8.2. The PasswordBox
      3. 5.8.3. The AutoCompleteBox
        1. 5.8.3.1. Filter Mode
        2. 5.8.3.2. Custom Filtering
        3. 5.8.3.3. Dynamic Item Lists
      4. 5.8.4. The RichTextBox
        1. 5.8.4.1. Text Elements
        2. 5.8.4.2. Formatting Text Elements
        3. 5.8.4.3. Manipulating Text Elements in Code
        4. 5.8.4.4. Creating a Text Editor
        5. 5.8.4.5. Saving and Opening Rich Text Files
        6. 5.8.4.6. Using Hyperlinks and Elements in a RichTextBox
    9. 5.9. Range-Based Controls
      1. 5.9.1. The Slider
      2. 5.9.2. The ProgressBar
    10. 5.10. Date Controls
    11. 5.11. The Last Word
  11. 6. The Application Model
    1. 6.1. The Application Class
      1. 6.1.1. Accessing the Current Application
      2. 6.1.2. Application Properties
    2. 6.2. Application Events
      1. 6.2.1. Application Startup
      2. 6.2.2. Initialization Parameters
      3. 6.2.3. Application Shutdown
      4. 6.2.4. Unhandled Exceptions
    3. 6.3. Custom Splash Screens
    4. 6.4. Binary Resources
      1. 6.4.1. Placing Resources in the Application Assembly
        1. 6.4.1.1. Using Subfolders
        2. 6.4.1.2. Programmatically Retrieving a Resource
      2. 6.4.2. Placing Resources in the Application Package
      3. 6.4.3. Placing Resources on the Web
        1. 6.4.3.1. Failing to Download Resources
        2. 6.4.3.2. Downloading Resources with WebClient
    5. 6.5. Class Library Assemblies
      1. 6.5.1. Using Resources in an Assembly
      2. 6.5.2. Downloading Assemblies on Demand
      3. 6.5.3. Supporting Assembly Caching
        1. 6.5.3.1. The Strong Key Name
        2. 6.5.3.2. The .extmap.xml File
    6. 6.6. The Last Word
  12. 7. Navigation
    1. 7.1. Loading User Controls
      1. 7.1.1. Embedding User Controls in a Page
      2. 7.1.2. Hiding Elements
      3. 7.1.3. Managing the Root Visual
      4. 7.1.4. Retaining Page State
      5. 7.1.5. Browser History
    2. 7.2. Child Windows
      1. 7.2.1. Designing a ChildWindow
      2. 7.2.2. Showing a ChildWindow
    3. 7.3. The Frame and Page
      1. 7.3.1. Frames
        1. 7.3.1.1. Browser URI Integration
          1. 7.3.1.1.1. What Happens If the Page Has More Than One Frame?
          2. 7.3.1.1.2. What Happens If the Startup Page Doesn't Include a Frame Control?
          3. 7.3.1.1.3. What About Security?
        2. 7.3.1.2. History Support
        3. 7.3.1.3. Navigation Failure
      2. 7.3.2. URI Mapping
      3. 7.3.3. Forward and Backward Navigation
      4. 7.3.4. Hyperlinks
      5. 7.3.5. Pages
        1. 7.3.5.1. Navigation Properties
        2. 7.3.5.2. State Storage
        3. 7.3.5.3. Navigation Methods
      6. 7.3.6. Navigation Templates
    4. 7.4. Custom Content Loaders
      1. 7.4.1. Authentication and Navigation
      2. 7.4.2. Creating a Custom Content Loader
      3. 7.4.3. Using the Custom Content Loader
    5. 7.5. The Last Word
  13. 8. Shapes and Geometries
    1. 8.1. Basic Shapes
      1. 8.1.1. The Shape Classes
      2. 8.1.2. Rectangle and Ellipse
      3. 8.1.3. Sizing and Placing Shapes
      4. 8.1.4. Sizing Shapes Proportionately with a Viewbox
      5. 8.1.5. Line
      6. 8.1.6. Polyline
      7. 8.1.7. Polygon
      8. 8.1.8. Line Caps and Line Joins
      9. 8.1.9. Dashes
    2. 8.2. Paths and Geometries
      1. 8.2.1. Line, Rectangle, and Ellipse Geometries
      2. 8.2.2. Combining Shapes with GeometryGroup
      3. 8.2.3. Curves and Lines with PathGeometry
        1. 8.2.3.1. Straight Lines
        2. 8.2.3.2. Arcs
        3. 8.2.3.3. Bézier Curves
      4. 8.2.4. The Geometry Mini-Language
      5. 8.2.5. Clipping with Geometry
    3. 8.3. Exporting Clip Art
      1. 8.3.1. Expression Design
      2. 8.3.2. Conversion
      3. 8.3.3. Save or Print to XPS
    4. 8.4. The Last Word
  14. 9. Brushes, Transforms, and Bitmaps
    1. 9.1. Brushes
      1. 9.1.1. The LinearGradientBrush Class
      2. 9.1.2. The RadialGradientBrush Class
      3. 9.1.3. The ImageBrush
    2. 9.2. Transparency
      1. 9.2.1. Opacity Masks
      2. 9.2.2. Making the Silverlight Control Transparent
    3. 9.3. Transforms
      1. 9.3.1. Transforming Shapes
      2. 9.3.2. Transforms and Layout Containers
      3. 9.3.3. A Reflection Effect
    4. 9.4. Perspective Transforms
      1. 9.4.1. The PlaneProjection Class
      2. 9.4.2. Applying a Projection
    5. 9.5. Pixel Shaders
      1. 9.5.1. BlurEffect
      2. 9.5.2. DropShadowEffect
      3. 9.5.3. ShaderEffect
    6. 9.6. The WriteableBitmap Class
      1. 9.6.1. Generating a Bitmap
      2. 9.6.2. Capturing Content from Other Elements
    7. 9.7. Printing
      1. 9.7.1. Printing a Single Element
      2. 9.7.2. Printing Over Multiple Pages
      3. 9.7.3. Creating a Print Preview
    8. 9.8. The Last Word
  15. 10. Animation
    1. 10.1. Understanding Silverlight Animation
      1. 10.1.1. The Rules of Animation
    2. 10.2. Creating Simple Animations
      1. 10.2.1. The Animation Class
      2. 10.2.2. The Storyboard Class
      3. 10.2.3. Starting an Animation with an Event Trigger
      4. 10.2.4. Starting an Animation with Code
      5. 10.2.5. Configuring Animation Properties
        1. 10.2.5.1. From
        2. 10.2.5.2. To
        3. 10.2.5.3. By
        4. 10.2.5.4. Duration
      6. 10.2.6. Animation Lifetime
        1. 10.2.6.1. RepeatBehavior
      7. 10.2.7. Simultaneous Animations
      8. 10.2.8. Controlling Playback
    3. 10.3. Animation Easing
      1. 10.3.1. Using an Easing Function
      2. 10.3.2. Easing In and Easing Out
      3. 10.3.3. Easing Function Classes
    4. 10.4. Animation Types Revisited
      1. 10.4.1. Animating Transforms
      2. 10.4.2. Animation Perspective Projections
      3. 10.4.3. Animating Brushes
      4. 10.4.4. Animating Pixel Shaders
      5. 10.4.5. Key-Frame Animation
        1. 10.4.5.1. Discrete Key Frames
        2. 10.4.5.2. Easing Key Frames
        3. 10.4.5.3. Spline Key Frames
    5. 10.5. Animations in Code
      1. 10.5.1. The Main Page
      2. 10.5.2. The Bomb User Control
      3. 10.5.3. Dropping the Bombs
      4. 10.5.4. Intercepting a Bomb
      5. 10.5.5. Counting Bombs and Cleaning Up
    6. 10.6. Encapsulating Animations
      1. 10.6.1. Page Transitions
      2. 10.6.2. The Base Class
      3. 10.6.3. The Wipe Transition
    7. 10.7. Frame-Based Animation
    8. 10.8. Animation Performance
      1. 10.8.1. Desired Frame Rate
      2. 10.8.2. Hardware Acceleration
        1. 10.8.2.1. Enabling Hardware Acceleration
        2. 10.8.2.2. Bitmap Caching
        3. 10.8.2.3. Evaluating Hardware Acceleration
    9. 10.9. The Last Word
  16. 11. Sound, Video, and Deep Zoom
    1. 11.1. Supported File Types
    2. 11.2. The MediaElement
      1. 11.2.1. Controlling Playback
      2. 11.2.2. Handling Errors
      3. 11.2.3. Playing Multiple Sounds
      4. 11.2.4. Changing Volume, Balance, and Position
      5. 11.2.5. Playing Video
      6. 11.2.6. Client-Side Playlists
      7. 11.2.7. Server-Side Playlists
      8. 11.2.8. Progressive Downloading and Streaming
      9. 11.2.9. Adaptive Streaming
    3. 11.3. Advanced Video Playback
      1. 11.3.1. Video Encoding
      2. 11.3.2. Encoding in Expression Encoder
      3. 11.3.3. Markers
        1. 11.3.3.1. Adding Markers with Expression Encoder
        2. 11.3.3.2. Using Markers in a Silverlight Application
      4. 11.3.4. VideoBrush
      5. 11.3.5. Video Effects
    4. 11.4. Webcam and Microphone Input
      1. 11.4.1. Accessing a Capture Device
      2. 11.4.2. Basic Webcam Support
      3. 11.4.3. Recording Audio Snippets
    5. 11.5. Deep Zoom
      1. 11.5.1. Creating a Deep Zoom Image Set
      2. 11.5.2. Using a Deep Zoom Image Set in Silverlight
    6. 11.6. The Last Word
  17. 12. Styles and Behaviors
    1. 12.1. Styles
      1. 12.1.1. Defining a Style
      2. 12.1.2. Applying a Style
      3. 12.1.3. Dynamic Styles
      4. 12.1.4. Style Inheritance
      5. 12.1.5. Organizing Styles
      6. 12.1.6. Automatically Applying Styles by Type
    2. 12.2. Behaviors
      1. 12.2.1. Getting Support for Behaviors
      2. 12.2.2. Triggers and Actions
        1. 12.2.2.1. Creating an Action
        2. 12.2.2.2. Connecting an Action to an Element
        3. 12.2.2.3. Design-Time Behavior Support in Blend
        4. 12.2.2.4. Creating a Targeted Trigger
      3. 12.2.3. Creating a Behavior
      4. 12.2.4. Finding More Behaviors
    3. 12.3. The Last Word
  18. 13. Templates and Custom Controls
    1. 13.1. Template Basics
      1. 13.1.1. Creating a Template
      2. 13.1.2. Reusing Control Templates
      3. 13.1.3. The ContentPresenter
      4. 13.1.4. Template Bindings
      5. 13.1.5. Setting Templates Through Styles
      6. 13.1.6. Reusing Colors
    2. 13.2. The Parts and States Model
      1. 13.2.1. Understanding States with the Button Control
      2. 13.2.2. Showing a Focus Cue
      3. 13.2.3. Transitions
        1. 13.2.3.1. The Default Transition
        2. 13.2.3.2. From and to Transitions
        3. 13.2.3.3. Transitioning to a Steady State
        4. 13.2.3.4. Custom Transition
      4. 13.2.4. Understanding Parts with the Slider Control
    3. 13.3. Creating Templates for Custom Controls
      1. 13.3.1. Planning the FlipPanel Control
      2. 13.3.2. Creating the Solution
      3. 13.3.3. Starting the FlipPanel Class
      4. 13.3.4. Adding the Default Style with Generic.xaml
      5. 13.3.5. Choosing Parts and States
      6. 13.3.6. Starting the Default Control Template
      7. 13.3.7. The FlipButton Control
      8. 13.3.8. Defining the State Animations
      9. 13.3.9. Wiring Up the Elements in the Template
      10. 13.3.10. Using the FlipPanel
      11. 13.3.11. Using a Different Control Template
    4. 13.4. The Last Word
  19. 14. Browser Integration
    1. 14.1. Interacting with HTML Elements
      1. 14.1.1. Getting Browser Information
      2. 14.1.2. The HTML Window
      3. 14.1.3. Popup Windows
      4. 14.1.4. Inspecting the HTML Document
      5. 14.1.5. Manipulating an HTML Element
        1. 14.1.5.1. Inserting and Removing Elements
        2. 14.1.5.2. Changing Style Properties
      6. 14.1.6. Handling JavaScript Events
    2. 14.2. Code Interaction
      1. 14.2.1. Calling Browser Script from Silverlight
      2. 14.2.2. Calling Silverlight Methods from the Browser
      3. 14.2.3. Instantiating Silverlight Objects in the Browser
    3. 14.3. Combining Silverlight and HTML Content
      1. 14.3.1. Sizing the Silverlight Control to Fit Its Content
      2. 14.3.2. Placing the Silverlight Control Next to an HTML Element
    4. 14.4. Securing HTML Interoperability
    5. 14.5. The Last Word
  20. 15. ASP.NET Web Services
    1. 15.1. Building Web Services for Silverlight
      1. 15.1.1. Creating a Web Service
      2. 15.1.2. Adding a Service Reference
      3. 15.1.3. Calling the Web Service
      4. 15.1.4. Configuring the Web Service URL
      5. 15.1.5. Using a Busy Indicator
    2. 15.2. Web Service Data Types
      1. 15.2.1. Custom Data Classes
      2. 15.2.2. Web Service Type Sharing
        1. 15.2.2.1. Identifying Your Data Classes
        2. 15.2.2.2. Sharing the Code
    3. 15.3. More Advanced Web Services
      1. 15.3.1. Cross-Domain Web Service Calls
      2. 15.3.2. Monitoring the Network Connection
      3. 15.3.3. Using ASP.NET Platform Services
    4. 15.4. Duplex Services
      1. 15.4.1. Configuring the Service
      2. 15.4.2. The Interfaces
      3. 15.4.3. The Service
      4. 15.4.4. The Client
    5. 15.5. The Last Word
  21. 16. Data Binding
    1. 16.1. Binding to Data Objects
      1. 16.1.1. Building a Data Object
      2. 16.1.2. Displaying a Data Object with DataContext
      3. 16.1.3. Storing a Data Object as a Resource
      4. 16.1.4. Null Values and Failed Bindings
      5. 16.1.5. Editing with Two-Way Bindings
      6. 16.1.6. Change Notification
      7. 16.1.7. Building a Data Service
      8. 16.1.8. Calling a Data Service
    2. 16.2. Binding to a Collection of Objects
      1. 16.2.1. Displaying and Editing Collection Items
      2. 16.2.2. Inserting and Removing Collection Items
      3. 16.2.3. Binding to a LINQ Expression
      4. 16.2.4. Master-Details Display
    3. 16.3. Validation
      1. 16.3.1. Error Notifications
      2. 16.3.2. The BindingValidationFailed Event
      3. 16.3.3. The Validation Class
      4. 16.3.4. Creating Data Objects with Built-in Validation
    4. 16.4. Data Formatting and Conversion
      1. 16.4.1. String Formatting
      2. 16.4.2. Value Converters
      3. 16.4.3. Formatting Strings with a Value Converter
      4. 16.4.4. Creating Objects with a Value Converter
      5. 16.4.5. Applying Conditional Formatting
    5. 16.5. Data Templates
      1. 16.5.1. Separating and Reusing Templates
      2. 16.5.2. More Advanced Templates
      3. 16.5.3. Changing Item Layout
    6. 16.6. The Last Word
  22. 17. Data Controls
    1. 17.1. Better Data Forms
      1. 17.1.1. The Goal: Data Class Markup
      2. 17.1.2. The Label
      3. 17.1.3. The DescriptionViewer
      4. 17.1.4. The ValidationSummary
    2. 17.2. Data Annotations
      1. 17.2.1. Raising Annotation Errors
      2. 17.2.2. The Annotation Attributes
        1. 17.2.2.1. Required
        2. 17.2.2.2. StringLength
        3. 17.2.2.3. Range
        4. 17.2.2.4. RegularExpression
        5. 17.2.2.5. CustomValidation
    3. 17.3. The DataGrid
      1. 17.3.1. Creating a Simple Grid
      2. 17.3.2. How Columns Are Resized and Rearranged
      3. 17.3.3. Defining Columns
        1. 17.3.3.1. The DataGridCheckBoxColumn
        2. 17.3.3.2. The DataGridTemplateColumn
      4. 17.3.4. Formatting and Styling Columns
      5. 17.3.5. Controlling Column Width
      6. 17.3.6. Formatting Rows
      7. 17.3.7. Row Details
      8. 17.3.8. Freezing Columns
      9. 17.3.9. Selection
      10. 17.3.10. Sorting
    4. 17.4. DataGrid Editing
      1. 17.4.1. Editing with Templates
      2. 17.4.2. Validation and Editing Events
    5. 17.5. The PagedCollectionView
      1. 17.5.1. Sorting
      2. 17.5.2. Filtering
      3. 17.5.3. Grouping
      4. 17.5.4. Paging
    6. 17.6. The TreeView
      1. 17.6.1. Filling a TreeView
      2. 17.6.2. A Data-Bound TreeView
    7. 17.7. The Last Word
  23. 18. File Access
    1. 18.1. Isolated Storage
      1. 18.1.1. The Scope of Isolated Storage
      2. 18.1.2. What to Put in Isolated Storage
    2. 18.2. Using Isolated Storage
      1. 18.2.1. Opening an Isolated Store
      2. 18.2.2. File Management
      3. 18.2.3. Writing and Reading Data
      4. 18.2.4. Requesting More Space
      5. 18.2.5. Storing Objects with XmlSerializer
      6. 18.2.6. Storing Application Settings
    3. 18.3. Accessing Files Outside of Isolated Storage
      1. 18.3.1. Reading Files with OpenFileDialog
      2. 18.3.2. Writing Files with SaveFileDialog
      3. 18.3.3. Transmitting Files with a Web Service
        1. 18.3.3.1. The File Service
        2. 18.3.3.2. The Silverlight Client
      4. 18.3.4. Dragging and Dropping Files
    4. 18.4. The Last Word
  24. 19. Multithreading
    1. 19.1. Understanding Multithreading
      1. 19.1.1. The Goals of Multithreading
      2. 19.1.2. The DispatcherTimer
    2. 19.2. The Thread Class
      1. 19.2.1. Marshaling Code to the User Interface Thread
      2. 19.2.2. Creating a Thread Wrapper
      3. 19.2.3. Creating the Worker Class
      4. 19.2.4. Using the Thread Wrapper
      5. 19.2.5. Cancellation Support
    3. 19.3. The BackgroundWorker
      1. 19.3.1. Creating the BackgroundWorker
      2. 19.3.2. Running the BackgroundWorker
      3. 19.3.3. Tracking Progress
      4. 19.3.4. Supporting Cancellation
    4. 19.4. The Last Word
  25. 20. Networking
    1. 20.1. Interacting with the Web
      1. 20.1.1. Cross-Domain Access
      2. 20.1.2. HTML Scraping
      3. 20.1.3. REST and Other Simple Web Services
      4. 20.1.4. Using Network Credentials
    2. 20.2. Processing Different Types of Data
      1. 20.2.1. XML
      2. 20.2.2. Services That Return XML Data
        1. 20.2.2.1. Navigating Over an XDocument
        2. 20.2.2.2. Querying an XDocument with LINQ
      3. 20.2.3. Services That Require XML Data
      4. 20.2.4. Services That Return SOAP Data
      5. 20.2.5. Services That Return JSON Data
      6. 20.2.6. RSS
    3. 20.3. Sockets
      1. 20.3.1. Understanding Sockets and TCP
      2. 20.3.2. The Policy Server
        1. 20.3.2.1. The Policy File
        2. 20.3.2.2. The PolicyServer Classes
        3. 20.3.2.3. The PolicyConnection Classes
      3. 20.3.3. The Messaging Server
      4. 20.3.4. The Messenger Client
        1. 20.3.4.1. Connecting to the Server
        2. 20.3.4.2. Sending Messages
        3. 20.3.4.3. Receiving Messages
    4. 20.4. Local Connections
      1. 20.4.1. Sending a Message
      2. 20.4.2. Receiving a Message
    5. 20.5. The Last Word
  26. 21. Out-of-Browser Applications
    1. 21.1. Understanding Out-of-Browser Support
    2. 21.2. Creating an Out-of-Browser Application
      1. 21.2.1. Installing an Out-of-Browser Application
      2. 21.2.2. Customizing Icons
      3. 21.2.3. Tracking Application State
      4. 21.2.4. Removing and Updating an Application
      5. 21.2.5. Silent Installation
    3. 21.3. Out-of-Browser Application Features
      1. 21.3.1. The WebBrowser Control
        1. 21.3.1.1. Showing HTML Content
        2. 21.3.1.2. The WebBrowserBrush
        3. 21.3.1.3. Interacting with JavaScript Code
      2. 21.3.2. Notification Windows
      3. 21.3.3. Controlling the Main Window
    4. 21.4. Elevated Trust
      1. 21.4.1. Installing an Elevated Trust Application
      2. 21.4.2. The Abilities of an Elevated Trust Application
      3. 21.4.3. Window Customization
      4. 21.4.4. File Access
      5. 21.4.5. COM
    5. 21.5. The Last Word