853 silverlight 5 in action

1K 475 0
853 silverlight 5 in action

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

... Atom 54 9 22.1 Parsing plain old XML LINQ to XML 22.2 55 0 ■ 55 0 XmlSerializer 55 4 Working with JSON 55 8 JsonObject and JsonArray 22.3 55 9 ■ Working with RSS and Atom Reading syndication feeds 56 6... Understanding your binding source 373 Binding to a property 374 Binding to an object 376 Binding to a UI element 378 Binding to an indexed element 381 Binding to a keyed (string indexed) element 382 Binding... caching 56 ■ ■ ■ ■ 3.2 Creating the Silverlight plug -in 58 Using the object tag 59 Using the Silverlight. js utility file Creating an instance of the Silverlight plug -in 61 60 ■ 3.3 Integrating

Ngày đăng: 11/07/2018, 14:40

Mục lục

  • Silverlight 5-front

  • brief contents

  • contents

  • preface

  • acknowledgments

  • about this book

    • Audience

    • The bits: what you need

    • Roadmap

      • Part 1 Core Silverlight

      • Part 2 Creating the user interface

      • Part 3 Working with data and services

      • Part 4 2D and 3D graphics

      • Part 5 Making the most of the platform

      • Part 6 Best practices

      • Appendixes

    • Code conventions and downloads

    • Author Online

    • About the author

    • About the title

  • about the cover illustration

  • Part 1 Core Silverlight

    • 1 Introducing Silverlight

      • 1.1 A Silverlight primer

        • 1.1.1 Silverlight and the web

        • 1.1.2 Silverlight and WPF

        • 1.1.3 Types of Silverlight applications

      • 1.2 A brief history of Silverlight

        • 1.2.1 Features for business and client applications

        • 1.2.2 Media and graphics enhancements

        • 1.2.3 User interaction

        • 1.2.4 Text

      • 1.3 Getting started with Silverlight development

        • 1.3.1 Setting up your development environment

        • 1.3.2 Helpful sites

      • 1.4 Building your first Silverlight web application

        • 1.4.1 Project setup

        • 1.4.2 User interface

        • 1.4.3 Calling Twitter search

        • 1.4.4 Parsing the results and binding the ListBox

        • 1.4.5 Making the ListBox contents more meaningful

      • 1.5 Summary

    • 2 XAML and the property system

      • 2.1 XAML basics

        • 2.1.1 Objects

        • 2.1.2 Namespaces

        • 2.1.3 Properties

        • 2.1.4 Dependency properties

        • 2.1.5 Attached properties

        • 2.1.6 Events

        • 2.1.7 Commands

      • 2.2 Object trees and namescope

        • 2.2.1 Object trees

        • 2.2.2 Namescope

      • 2.3 XAML type converters

      • 2.4 Loading XAML at runtime

      • 2.5 Summary

    • 3 The application model and the plug-in

      • 3.1 The Silverlight application model

        • 3.1.1 Application startup process

        • 3.1.2 XAP

        • 3.1.3 The application manifest file

        • 3.1.4 The Silverlight application object

        • 3.1.5 Application dependencies

        • 3.1.6 Assembly caching

      • 3.2 Creating the Silverlight plug-in

        • 3.2.1 Using the object tag

        • 3.2.2 Using the Silverlight.js utility file

        • 3.2.3 Creating an instance of the Silverlight plug-in

      • 3.3 Integrating the Silverlight plug-in

        • 3.3.1 Relating the Silverlight application to the HTML DOM

        • 3.3.2 Clarifying the initial experience

        • 3.3.3 Handling plug-in events

        • 3.3.4 Sending initialization parameters

      • 3.4 Summary

    • 4 Working with HTML and browsers

      • 4.1 Silverlight and the HTML DOM

      • 4.2 Working with the web page from managed code

        • 4.2.1 Navigating web page contents

        • 4.2.2 Working with element properties

        • 4.2.3 Handling CSS information

        • 4.2.4 Accessing the query string

      • 4.3 Working with the hosting browser window

        • 4.3.1 Prompting the user

        • 4.3.2 Navigating the browser window

        • 4.3.3 Discovering the browser properties

      • 4.4 Bridging the scripting and managed code worlds

        • 4.4.1 Calling managed code from JavaScript

        • 4.4.2 Using JavaScript from managed code

      • 4.5 Hosting HTML in Silverlight

        • 4.5.1 Hosting the WebBrowser control

        • 4.5.2 Using the WebBrowserBrush

      • 4.6 Summary

    • 5 Out-of-browser applications

      • 5.1 Implementation specifics

        • 5.1.1 Process and hosting

        • 5.1.2 Capabilities and restrictions

      • 5.2 The end-user experience

      • 5.3 Creating out-of-browser applications

        • 5.3.1 The out-of-browser settings file

        • 5.3.2 Controlling the experience

        • 5.3.3 Customizing icons

        • 5.3.4 Updating

      • 5.4 Alerting the user with notification toast

      • 5.5 Controlling the host window

        • 5.5.1 Basic window properties

        • 5.5.2 Changing window chrome

        • 5.5.3 Minimizing, maximizing, restoring, and closing

        • 5.5.4 Moving a window

        • 5.5.5 Resizing

      • 5.6 Summary

    • 6 The security model and elevated trust

      • 6.1 Code classifications and the transparency model

      • 6.2 User initiation and consent

      • 6.3 Elevated trust

        • 6.3.1 Creating elevated trust applications

        • 6.3.2 Enabling in-browser elevated trust applications

        • 6.3.3 Detecting elevated trust mode

      • 6.4 Summary

  • Part 2 Creating the user interface

    • 7 Rendering, layout, and transforming

      • 7.1 The UIElement and FrameworkElement

        • 7.1.1 Properties

        • 7.1.2 Methods

      • 7.2 The rendering process

        • 7.2.1 Clock tick

        • 7.2.2 Per-frame rendering callback

        • 7.2.3 Rasterization

      • 7.3 The layout system

        • 7.3.1 Multipass layout—measuring and arranging

        • 7.3.2 The LayoutInformation class

        • 7.3.3 Performance considerations

      • 7.4 Render transforms

        • 7.4.1 RotateTransform

        • 7.4.2 ScaleTransform

        • 7.4.3 SkewTransform

        • 7.4.4 TranslateTransform

        • 7.4.5 TransformGroup

        • 7.4.6 CompositeTransform

        • 7.4.7 MatrixTransform

      • 7.5 3D projection transforms

        • 7.5.1 PlaneProjection

        • 7.5.2 Matrix3dProjection

      • 7.6 Summary

    • 8 Panels

      • 8.1 Canvas

        • 8.1.1 Setting the offsets

        • 8.1.2 Setting the stack order

      • 8.2 The StackPanel

      • 8.3 The WrapPanel

        • 8.3.1 Vertical wrapping

        • 8.3.2 Horizontal wrapping

      • 8.4 The Grid

        • 8.4.1 Arranging Grid content

        • 8.4.2 Positioning Grid content

        • 8.4.3 Spanning cells

        • 8.4.4 Sizing it up

        • 8.4.5 Working with the grid programmatically

        • 8.4.6 Customizing cell boundaries

      • 8.5 Summary

    • 9 Human input

      • 9.1 Capturing the keyboard

        • 9.1.1 Understanding focus

        • 9.1.2 Handling keyboard events

        • 9.1.3 Dealing with modifier keys

      • 9.2 Mouse input

        • 9.2.1 Mouse movement events

        • 9.2.2 Mouse button events

        • 9.2.3 Using the mouse wheel

      • 9.3 Using multitouch

      • 9.4 Collecting ink drawings

        • 9.4.1 Creating the InkPresenter

        • 9.4.2 Collecting ink

        • 9.4.3 Styling the ink

      • 9.5 Summary

    • 10 Text fundamentals

      • 10.1 The text system

        • 10.1.1 Subpixel text rendering

        • 10.1.2 Text hinting

        • 10.1.3 Text formatting

        • 10.1.4 Text rendering

      • 10.2 Displaying text

        • 10.2.1 Font properties

        • 10.2.2 Flow control

        • 10.2.3 Text properties

        • 10.2.4 Spacing

      • 10.3 OpenType font support

        • 10.3.1 Ligatures

        • 10.3.2 Stylistic sets

        • 10.3.3 Font capitals

        • 10.3.4 Fractions and numbers

        • 10.3.5 Variants, superscript, and subscript

      • 10.4 Embedding fonts

      • 10.5 Summary

    • 11 Editing plain and rich text

      • 11.1 Handling basic text input

        • 11.1.1 Enabling multiline text support

        • 11.1.2 Mastering text selection

      • 11.2 Understanding input method editors

      • 11.3 Copying text with the Clipboard API

      • 11.4 Collecting sensitive data

      • 11.5 Entering and displaying rich text

        • 11.5.1 Formatting and inline elements

        • 11.5.2 Working with selected text

      • 11.6 Multicolumn and free-form linked text

        • 11.6.1 Multicolumn text

        • 11.6.2 Free-form text layout

      • 11.7 Summary

    • 12 Control basics and UserControls

      • 12.1 Control

        • 12.1.1 Appearance

        • 12.1.2 Tab navigation and control state

        • 12.1.3 Templating

      • 12.2 ContentControl

        • 12.2.1 The ContentPresenter

      • 12.3 Button controls

        • 12.3.1 The Button

        • 12.3.2 The HyperlinkButton

        • 12.3.3 The RadioButton

        • 12.3.4 The CheckBox

      • 12.4 ItemsControls

        • 12.4.1 The ListBox

        • 12.4.2 The ComboBox

        • 12.4.3 The TabControl

      • 12.5 Creating UserControls

        • 12.5.1 Defining the appearance

        • 12.5.2 Defining behavior of a control

        • 12.5.3 Calling the control

      • 12.6 Summary

    • 13 Animation and behaviors

      • 13.1 Animating a value over time

      • 13.2 Mastering the timeline

        • 13.2.1 What type of property are you animating?

        • 13.2.2 Where are you starting from and where are you going?

        • 13.2.3 How long should the animation run?

      • 13.3 Storyboards

        • 13.3.1 Understanding the storyboard

        • 13.3.2 Storyboard target

        • 13.3.3 Controlling the Storyboard

        • 13.3.4 Resources

      • 13.4 Keyframing

      • 13.5 Interpolation

        • 13.5.1 Linear interpolation

        • 13.5.2 Spline interpolation

        • 13.5.3 Discrete interpolation

        • 13.5.4 KeyTime

      • 13.6 Easing functions

        • 13.6.1 Using easing functions

        • 13.6.2 Creating a custom easing function

      • 13.7 Behaviors, triggers, and actions

        • 13.7.1 Using existing behaviors

        • 13.7.2 Creating your own behavior

      • 13.8 Summary

    • 14 Resources, styles, and control templates

      • 14.1 Being resourceful

        • 14.1.1 Declarative resources

        • 14.1.2 Accessing loose resources

        • 14.1.3 Bundled resources

      • 14.2 Giving your elements style

        • 14.2.1 Defining the look

        • 14.2.2 Explicitly keyed style definitions

        • 14.2.3 Implicit style definitions

      • 14.3 Creating templates

        • 14.3.1 Building a control template

        • 14.3.2 Creating reusable templates

      • 14.4 Dealing with visual states

        • 14.4.1 Understanding the components

        • 14.4.2 Leveraging the VisualStateManager

      • 14.5 Sharing your visual states

      • 14.6 Summary

    • 15 Extensions, converters, custom controls, and panels

      • 15.1 Markup extensions

        • 15.1.1 Creating a simple custom markup extension

        • 15.1.2 Creating a parameterized markup extension

      • 15.2 Custom type converters

        • 15.2.1 Creating the converter

        • 15.2.2 Using the converter

      • 15.3 Creating a custom panel

        • 15.3.1 Project setup

        • 15.3.2 The OrbitPanel class

        • 15.3.3 Properties

        • 15.3.4 Custom layout

        • 15.3.5 Enhancements

      • 15.4 Creating a custom control

        • 15.4.1 Choosing the base type

        • 15.4.2 Properties

        • 15.4.3 The control template contract

        • 15.4.4 The default template

        • 15.4.5 Visual states

        • 15.4.6 Visual states in template

      • 15.5 Summary

  • Part 3 Working with data and services

    • 16 Binding

      • 16.1 Binding basics

        • 16.1.1 Mastering the binding syntax

        • 16.1.2 Choosing a binding mode

      • 16.2 Understanding your binding source

        • 16.2.1 Binding to a property

        • 16.2.2 Binding to an object

        • 16.2.3 Binding to a UI element

        • 16.2.4 Binding to an indexed element

        • 16.2.5 Binding to a keyed (string indexed) element

        • 16.2.6 Binding to an entire collection

        • 16.2.7 Deciding when to update binding

      • 16.3 Binding to dynamic properties

        • 16.3.1 ICustomTypeProvider overview

        • 16.3.2 Creating the helper classes

        • 16.3.3 Using the helper class

      • 16.4 Customizing the display

        • 16.4.1 Formatting values

        • 16.4.2 Converting values during binding

        • 16.4.3 Providing default fallback values

        • 16.4.4 Handling null values

      • 16.5 Creating explicit data templates

        • 16.5.1 Using a DataTemplate with a ContentControl

        • 16.5.2 Rendering an ItemsControl with a DataTemplate

      • 16.6 Creating implicit data templates

      • 16.7 Summary

    • 17 Data controls: DataGrid and DataForm

      • 17.1 The DataGrid

        • 17.1.1 Displaying your data

        • 17.1.2 Editing grid data

        • 17.1.3 Sorting items

      • 17.2 The DataForm

        • 17.2.1 Displaying your data

        • 17.2.2 Binding to lists of data

        • 17.2.3 Customizing display

        • 17.2.4 Customizing edit, add, and display templates

        • 17.2.5 Finer control over editing and committing data

      • 17.3 Annotating for display

        • 17.3.1 The Display attribute

        • 17.3.2 The Editable attribute

      • 17.4 Summary

    • 18 Input validation

      • 18.1 The validation example source and UI

      • 18.2 Exception-based property validation

        • 18.2.1 Handling exception validation errors

        • 18.2.2 Custom validation code

        • 18.2.3 Validation error display

      • 18.3 Synchronous validation with IDataErrorInfo

        • 18.3.1 The IDataErrorInfo interface

        • 18.3.2 Simple validation with IDataErrorInfo

        • 18.3.3 Cross-field validation with IDataErrorInfo

        • 18.3.4 Combining exceptions and IDataErrorInfo

      • 18.4 Asynchronous validation with INotifyDataErrorInfo

        • 18.4.1 The INotifyDataErrorInfo interface

        • 18.4.2 Implementing the interface

        • 18.4.3 Binding support

        • 18.4.4 Building the WCF web service

        • 18.4.5 Adding the client service code

        • 18.4.6 Property modifications

      • 18.5 Annotating for validation

        • 18.5.1 Validation attributes

        • 18.5.2 Annotating your entity

        • 18.5.3 Calling external validation functions

        • 18.5.4 Creating custom validators

      • 18.6 Comparison of validation approaches

      • 18.7 Summary

    • 19 Networking basics

      • 19.1 The web request/response pattern

        • 19.1.1 WebRequest and HttpWebRequest

        • 19.1.2 WebResponse and HttpWebResponse

      • 19.2 Simplifying the request/response pattern with WebClient

        • 19.2.1 String operations

        • 19.2.2 Stream operations

      • 19.3 Asynchronous communication

        • 19.3.1 When async methods attack

        • 19.3.2 Saving your sanity with Rx

        • 19.3.3 Simplifying with tasks

      • 19.4 Trust and cross-domain network access

        • 19.4.1 Structuring the cross-domain file

        • 19.4.2 Other cross-domain policy files

        • 19.4.3 Locating your cross-domain policy

      • 19.5 The browser HTTP stack

        • 19.5.1 Connection count limit

        • 19.5.2 Cookies

        • 19.5.3 Caching

      • 19.6 The client HTTP stack

        • 19.6.1 Manually creating the client stack

        • 19.6.2 Automatically using the client stack

        • 19.6.3 Automatically setting the HTTP Referer and other headers

        • 19.6.4 Authentication credentials

        • 19.6.5 Managing cookies with the CookieContainer

        • 19.6.6 When to use the client stack

      • 19.7 Checking the network state

      • 19.8 Summary

    • 20 Working with SOAP services

      • 20.1 Introducing ASP.NET SOAP services using ASP.NET

        • 20.1.1 Silverlight-compatible SOAP services

        • 20.1.2 Service references

        • 20.1.3 Receiving data with the proxy

        • 20.1.4 Sending data using the proxy

      • 20.2 Using WCF services and complex data types

        • 20.2.1 Creating the Silverlight-enabled WCF service

        • 20.2.2 Sharing type definitions

        • 20.2.3 Adding the service reference

        • 20.2.4 Using the service

      • 20.3 Using the configuration file

      • 20.4 Error handling with WCF

        • 20.4.1 Using an out parameter

        • 20.4.2 Exposing exception information for debugging

        • 20.4.3 Error handling with WCF SOAP faults

      • 20.5 Summary

    • 21 RESTful services with the ASP.NET Web API

      • 21.1 Creating a RESTful service using the ASP.NET Web API

        • 21.1.1 Solution setup

        • 21.1.2 Creating the services

        • 21.1.3 Testing the service using the browser

        • 21.1.4 Adding the Silverlight project

      • 21.2 Consuming REST services

        • 21.2.1 REST service GET operations

        • 21.2.2 Updating resources by POSTing to the service

        • 21.2.3 Removing resources using DELETE

      • 21.3 Summary

    • 22 Working with XML, JSON, RSS, and Atom

      • 22.1 Parsing plain old XML

        • 22.1.1 LINQ to XML

        • 22.1.2 XmlSerializer

      • 22.2 Working with JSON

        • 22.2.1 JsonObject and JsonArray

        • 22.2.2 DataContractJsonSerializer

      • 22.3 Working with RSS and Atom

        • 22.3.1 Reading syndication feeds

        • 22.3.2 Working with feed items

      • 22.4 Summary

    • 23 Duplex, sockets, and local connections

      • 23.1 WCF polling duplex services

        • 23.1.1 Creating the project and callback contract

        • 23.1.2 Creating the service

        • 23.1.3 Creating the service logic

        • 23.1.4 Managing client subscriptions

        • 23.1.5 Using the duplex service

      • 23.2 Connecting to sockets

        • 23.2.1 Serving the policy file

        • 23.2.2 Opening the connection

        • 23.2.3 Handling the response

      • 23.3 Multicast sockets

        • 23.3.1 Any-Source Multicast/Internet Standard Multicast

        • 23.3.2 Source-Specific Multicast

      • 23.4 Connecting to other local Silverlight applications

        • 23.4.1 Creating the receiver

        • 23.4.2 Creating the sender

        • 23.4.3 Putting it all together

      • 23.5 Summary

  • Part 4 2D and 3D graphics

    • 24 Graphics and effects

      • 24.1 Shapes

        • 24.1.1 Lines

        • 24.1.2 Rectangle

        • 24.1.3 Ellipse

        • 24.1.4 Polyline

        • 24.1.5 Polygon

      • 24.2 Geometry

        • 24.2.1 Simple geometries

        • 24.2.2 Path geometries

        • 24.2.3 Composite geometries

      • 24.3 Brushes

        • 24.3.1 SolidColorBrush

        • 24.3.2 LinearGradientBrush

        • 24.3.3 RadialGradientBrush

        • 24.3.4 ImageBrush

        • 24.3.5 VideoBrush

      • 24.4 Effects

        • 24.4.1 Using built-in effects

        • 24.4.2 Creating custom pixel shaders

      • 24.5 Summary

    • 25 Working with images

      • 25.1 Basic imaging

      • 25.2 Creating images at runtime

        • 25.2.1 Creating from existing images

        • 25.2.2 Creating from UI elements

        • 25.2.3 A Mandelbrot fractal generator

      • 25.3 Deep Zoom

        • 25.3.1 Showing an image

        • 25.3.2 Zooming in and out

        • 25.3.3 Managing the viewport

        • 25.3.4 Deploying multiscale images

      • 25.4 Dealing with dead space

        • 25.4.1 Filling the space

        • 25.4.2 Uniform sizing

        • 25.4.3 Fill the area

        • 25.4.4 UniformToFill

      • 25.5 Summary

    • 26 Introduction to 3D

      • 26.1 3D—a natural way of interacting with information

      • 26.2 The Silverlight/XNA 3D API

        • 26.2.1 Rendering pipeline

        • 26.2.2 Project templates

      • 26.3 Detecting capabilities with the GraphicsDeviceManager

      • 26.4 Using the DrawingSurface

      • 26.5 Project structure: the scene and objects

        • 26.5.1 The scene

        • 26.5.2 Renderable scene objects

        • 26.5.3 The camera

      • 26.6 Vertices

        • 26.6.1 Building a triangle using vertices

        • 26.6.2 Adding the triangle to the scene

      • 26.7 Primitives

        • 26.7.1 The TriangleList primitive

        • 26.7.2 The TriangleStrip primitive

        • 26.7.3 Tessellating a sphere

        • 26.7.4 Rendering the sphere with primitives

      • 26.8 Summary

    • 27 3D lighting, texturing, and animation

      • 27.1 Lighting and normal vectors

        • 27.1.1 Lighting the scene

        • 27.1.2 Sphere normal vectors

        • 27.1.3 Indexed vertices

      • 27.2 Applying a texture

        • 27.2.1 The ContentManager

        • 27.2.2 Texturing the sphere

        • 27.2.3 Adding and texturing a background

      • 27.3 Coordinate spaces and matrices

        • 27.3.1 The three coordinate space conversion matrices

        • 27.3.2 The Matrix class

      • 27.4 Keyframe animation

        • 27.4.1 The KeyFrame and KeyframeAnimation classes

        • 27.4.2 Using animation

      • 27.5 Summary

  • Part 5 Making the most of the platform

    • 28 Pop-ups, windows, and full-screen applications

      • 28.1 Showing pop-ups and child windows

        • 28.1.1 The Popup control

        • 28.1.2 Displaying a dialog box with the ChildWindow control

      • 28.2 Creating native windows

        • 28.2.1 Creating a normal window

        • 28.2.2 Customizing window chrome

      • 28.3 Running in full screen

        • 28.3.1 Normal full-screen mode

        • 28.3.2 Elevated trust full-screen mode

      • 28.4 Summary

    • 29 Navigation

      • 29.1 Browser navigation background

        • 29.1.1 Browser journals

        • 29.1.2 Anchor hashtags

        • 29.1.3 Back and forth

      • 29.2 The Navigation Application template

        • 29.2.1 Creating a navigation application

        • 29.2.2 Adding a new page

        • 29.2.3 Changing the application theme

      • 29.3 Navigating to pages

        • 29.3.1 The Page class

        • 29.3.2 The NavigationService class

        • 29.3.3 Frames and URIs

        • 29.3.4 Caching pages

        • 29.3.5 Navigating to pages in other assemblies

      • 29.4 Navigation out of the browser

        • 29.4.1 Providing custom navigation controls

      • 29.5 Summary

    • 30 Working with files and directories

      • 30.1 Using the file open and save dialogs

        • 30.1.1 Working with the OpenFileDialog

        • 30.1.2 Saving files with the SaveFileDialog

      • 30.2 Working with directories

        • 30.2.1 Getting directory timestamps

        • 30.2.2 Checking for directory existence

        • 30.2.3 Getting the directory root

        • 30.2.4 Creating and deleting directories

        • 30.2.5 Listing directory contents

        • 30.2.6 Accessing special folders

      • 30.3 Working with individual files

        • 30.3.1 Creating a file

        • 30.3.2 Writing to a file

        • 30.3.3 Reading from a file

        • 30.3.4 Getting and setting file metadata

        • 30.3.5 File utility functions

      • 30.4 Storing data in isolated storage

        • 30.4.1 IsolatedStorageFile: the virtual filesystem

        • 30.4.2 Reading and writing files: the isolated storage way

      • 30.5 Summary

    • 31 Printing

      • 31.1 How Silverlight printing works

        • 31.1.1 The PrintDocument class

        • 31.1.2 The PrintPage Event

        • 31.1.3 Converting to PostScript

        • 31.1.4 Rasterization

        • 31.1.5 Forcing bitmap printing

        • 31.1.6 Forcing vector printing

      • 31.2 Printing onscreen information

        • 31.2.1 Printing the content as is

        • 31.2.2 Reparenting the elements to fit

        • 31.2.3 Scaling content to fit

      • 31.3 Multipage printing dedicated trees

        • 31.3.1 Prerequisites

        • 31.3.2 Printing line items

        • 31.3.3 Adding multipage support

        • 31.3.4 Adding a header and footer

      • 31.4 Summary

    • 32 COM, Native Extensions, and p-invoke

      • 32.1 COM automation

        • 32.1.1 Detecting COM automation availability

        • 32.1.2 Using COM automation to make Silverlight talk

        • 32.1.3 Accessing GPS data using COM automation

        • 32.1.4 Automating Excel

      • 32.2 Native Extensions for Silverlight

        • 32.2.1 Accessing an accelerometer

        • 32.2.2 Integrating with the Windows taskbar

        • 32.2.3 Runtime automation server installation

      • 32.3 P-invoke for API calls

        • 32.3.1 Setting up the printer application

        • 32.3.2 The Win32 API interface

      • 32.4 Summary

  • Part 6 Best practices

    • 33 Structuring and testing with the MVVM pattern

      • 33.1 Project setup and traditional code-behind approach

        • 33.1.1 Project and service setup

        • 33.1.2 A typical code-behind solution

      • 33.2 Model-View-ViewModel basics

        • 33.2.1 Myths about MVVM Model-View-ViewModel

        • 33.2.2 Keep it simple: a basic ViewModel implementation

      • 33.3 Factoring out reusable code

        • 33.3.1 Business rules and logic

        • 33.3.2 Data access and service calls

      • 33.4 Better separation from the UI

        • 33.4.1 Using commands

        • 33.4.2 Using the CallMethodAction behavior

        • 33.4.3 View-specific entities and ViewModels

        • 33.4.4 Interfaces, IoC, and ViewModel locators

      • 33.5 Testing MVVM applications

        • 33.5.1 Introduction to the Silverlight Unit Testing Framework

        • 33.5.2 Testing the ViewModel

        • 33.5.3 Testing asynchronous operations

      • 33.6 Summary

    • 34 Debugging your application

      • 34.1 Debugging basics

        • 34.1.1 Using the Debug class

        • 34.1.2 IDE breakpoints

        • 34.1.3 The good old MessageBox

      • 34.2 Binding debugging

        • 34.2.1 Viewing binding errors in the output window

        • 34.2.2 Debugging with custom value converters

        • 34.2.3 Using XAML breakpoints

      • 34.3 Troubleshooting network operations

        • 34.3.1 Installing Fiddler

        • 34.3.2 Monitoring and logging traffic

        • 34.3.3 Inspecting individual requests

      • 34.4 Summary

    • 35 The install experience and preloaders

      • 35.1 Handling the ‘Silverlight not installed’ scenarios

        • 35.1.1 Creating your own install experience

      • 35.2 Using a custom preloader

        • 35.2.1 Creating the appearance

        • 35.2.2 Integrating the custom splash screen

        • 35.2.3 Monitoring the load progress

      • 35.3 Summary

  • appendix A: Database, connection, and data model setup

    • A.1 Install the AdventureWorks database

      • A.1.1 Installing on a dedicated SQL Server instance

      • A.1.2 Installing on SQL Server Express

    • A.2 Database connection and entities

      • A.2.1 Choosing the entities to create

  • index

    • Symbols

    • Numerics

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    • H

    • I

    • J

    • K

    • L

    • M

    • N

    • O

    • P

    • Q

    • R

    • S

    • T

    • U

    • V

    • W

    • X

    • Y

    • Z

  • Silverlight 5-back

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan