Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Microsoft Silverlight 5 Data and Services Cookbook
Microsoft Silverlight 5 Data and Services Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Instant Updates on New Packt Books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Learning the Nuts and Bolts of Silverlight 5
Introduction
Getting our environment ready to start building Silverlight applications
How to do it...
How it works...
See also
Creating our first service-enabled and data-driven Silverlight 5 application using Visual Studio 2010
Getting ready
How to do it...
How it works...
The solution and project structure
Services
Data binding
See also
Using the workflow between Visual Studio 2010 and Blend 5
Getting ready
How to do it...
How it works...
See also
Using source control in Visual Studio 2010 and Blend 5
Getting ready
How to do it...
How it works...
There's more...
Commonly used terms in TFS
Deploying a Silverlight application on the server
How to do it...
How it works...
Configuration changes on the server
What if the server doesn't allow using XAP?
2. An Introduction to Data Binding
Introduction
Displaying data in Silverlight applications
Getting ready
How to do it...
How it works...
There's more...
See also
Creating dynamic bindings
Getting ready
How to do it...
How it works...
There's more...
Binding data to another UI element
Getting ready
How to do it...
How it works...
There's more...
Element bindings without bindings
See also
Binding collections to UI elements
Getting ready
How to do it...
How it works...
There's more...
See also
Enabling a Silverlight application to automatically update its UI
Getting ready
How to do it...
How it works...
Single objects
Collections
Cleaning up the code
Obtaining data from any UI element it is bound to
Getting ready
How to do it...
How it works...
See also
Using the different modes of data binding to allow persisting data
Getting ready
How to do it...
How it works...
There's more...
See also
Debugging data binding expressions in Visual Studio
Getting ready
How to do it...
How it works
See also
Data binding from Expression Blend 5
How to do it...
How it works...
Using Expression Blend 5 for sample data generation
How to do it...
3. Advanced Data Binding
Introduction
Hooking into the data binding process
Getting ready
How to do it...
How it works...
The ConverterParameter
Displaying images based on a URL with converters
Replacing converters with Silverlight 5 BindingBase properties
Getting ready
How to do it...
How it works...
See also
Validating data-bound input
Getting ready
How to do it...
How it works...
There's more...
See also
Validating data input using attributes
Getting ready
How to do it...
How it works...
There's more...
Other uses of data annotations
See also
Validating using IDataErrorInfo and INotifyDataErrorInfo
Getting ready
How to do it...
How it works...
There's more...
See also
Using templates to customize the way data is shown by controls
Getting ready
How to do it...
How it works...
Using implicit data templates
Getting ready
How to do it...
How it works
See also
Using the Ancestor RelativeSource binding
Getting ready
How to do it...
How it works
See also
Creating custom markup extensions
Getting ready
How to do it...
How it works
Building a change-aware collection type
Getting ready
How to do it...
How it works...
See also
Combining converters, data binding, and DataContext into a custom DataTemplate
Getting ready
How to do it...
How it works...
See also
4. The Data Grid
Introduction
Displaying data in a customized DataGrid
Getting ready
How to do it...
How it works...
There's more...
See also...
Inserting, updating, and deleting data in a DataGrid
Getting ready
How to do it...
How it works...
See also...
Sorting and grouping data in a DataGrid
Getting ready
How to do it...
How it works...
There's more...
Sorting a template column
See also
Filtering and paging data in a DataGrid
Getting ready
How to do it...
How it works...
There's more...
See also...
Using custom columns in the DataGrid
Getting ready
How to do it...
How it works...
There's more...
Implementing master-detail in the DataGrid
Getting ready
How to do it...
How it works...
There's more...
Validating the DataGrid
Getting ready
How to do it...
How it works...
There's more...
See also...
5. Working with Local Data
Introduction
Reading data from and storing data in the isolated storage
Getting ready
How to do it...
How it works...
Where's my data
Isolated storage size
See also
Working with IsolatedStorageSettings
Getting ready
How to do it...
How it works...
See also
Caching data between different Silverlight applications using isolated storage
Getting ready
How to do it...
How it works...
What about IsolatedStorageSettings?
Using the Sterling database
Getting ready
How to do it...
How it works...
Getting Sterling
Creating a database
The Sterling engine
Saving and loading data
Triggers
See also
6. MVVM
Introduction
Creating a basic MVVM application
Getting ready
How to do it...
How it works...
See also
Using MVVM Light to enable MVVM applications
Getting ready
How to do it...
How it works...
There's more...
See also
Connecting a View to a ViewModel using a ViewModelLocator
Getting ready
How to do it...
How it works...
There's more...
See also
Connecting a View to a ViewModel using MEF
Getting ready
How to do it...
How it works...
There's more...
See also
Using commands to pass your events to the ViewModel
Getting ready
How to do it...
How it works...
There's more...
See also
Communicating between different ViewModels
Getting ready
How to do it...
How it works...
There's more...
See also
Leveraging a messenger to wrap application-wide messages
Getting ready
How to do it...
How it works...
There's more...
See also
7. Working with Services
Introduction
Connecting and reading from a standardized service
Getting ready
How to do it...
How it works...
See also
Persisting data using a standardized service
Getting ready
How to do it...
How it works...
See also
Configuring cross-domain calls
Getting ready
How to do it...
How it works...
Working cross-domain from a trusted Silverlight application
Getting ready
How to do it...
How it works...
See also
Reading XML using HttpWebRequest
Getting ready
How to do it...
How it works...
The request
The response
Threading headaches
See also
Reading out an RSS feed
Getting ready
How to do it...
How it works...
There's more...
RSS versions
Accessing a database in the cloud
Getting ready
How to do it...
How it works
Accessing a service in the cloud
Getting ready
How to do it...
How it works
See also
Running a Silverlight application from the cloud
Getting ready
How to do it...
How it works
There's more
See also
Using socket communication in Silverlight
Getting ready
How to do it...
How it works...
The policy server
The socket server
Connecting the Silverlight application
8. Talking to WCF and ASMX Services
Introduction
Invoking a service that exposes data
Getting ready
How to do it...
How it works...
The WCF service
Connecting to the service
See also
Invoking a service such as Bing.com
Getting ready
How to do it...
How it works...
There's more...
See also
Optimizing performance using binary XML
Getting ready
How to do it...
How it works...
The default configuration is different depending on the version of Silverlight you're using
Using binary encoding is not a security measure
See also
Debugging a service in Silverlight
Getting ready
How to do it...
How it works...
Types of faults
Declared faults
Undeclared faults
Using ASP.NET Authentication in Silverlight
Getting ready
How to do it...
How it works...
There's more
Uploading files to a WCF service
Getting ready
How to do it...
How it works...
See also
Displaying images as a stream from a WCF service
Getting ready
How to do it...
How it works...
See also
9. Talking to WCF and ASMX Services—One Step Beyond
Introduction
Using duplex communication over HTTP
Getting ready
How to do it...
How it works...
PollingDuplexBinding: polling, binding, and assemblies
The service
The client
See also
Using duplex communication with the WCF net.tcp binding
Getting ready
How to do it...
How it works...
Running with elevated permissions
Setup requirements
See also
Ensuring data is encrypted
Getting ready
How to do it...
How it works...
See also
Securing service communication using message-based security
Getting ready
How to do it...
How it works...
Transport security is required
See also
Integrating Windows Identity Foundation in Silverlight
Getting ready
How to do it...
How it works...
See also
Calling a WCF service from Silverlight using ChannelFactory
Getting ready
How to do it...
How it works...
10. Talking to REST and WCF Data Services
Introduction
Reading data from a REST service
Getting ready
How to do it...
How it works...
See also
Parsing REST results with LINQ To XML
Getting ready
How to do it...
How it works...
See also
Persisting data using a REST service
Getting ready
How to do it...
How it works...
There's more...
See also
Working with the ClientHttp stack
Getting ready
How to do it...
How it works...
Advantages of the ClientHttp stack
See also
Communicating with a REST service using JSON
Getting ready
How to do it...
How it works...
See also
Using WCF Data Services with Silverlight
Getting ready
How to do it...
How it works...
Locked-down services
See also
Reading data using WCF Data Services
Getting ready
How to do it...
How it works...
There's more...
See also
Persisting data using WCF Data Services
Getting ready
How to do it...
How it works...
There's more...
Talking to Flickr
Getting ready
How to do it...
How it works...
There's more...
Flickr... more information
See also
Talking to Twitter over REST
Getting ready
How to do it...
How it works...
See also
Passing credentials and cross-domain access to Twitter from a trusted Silverlight application
Getting ready
How to do it...
How it works...
Let's go cross-domain!
Pass me those credentials, will you?
See also
11. Using WCF RIA Services
Introduction
Setting up a data solution to work with WCF RIA Services
Getting ready
How to do it...
How it works...
There's more...
The WCF RIA Services Toolkit
See also
Using a WCF RIA Services class library
Getting ready
How to do it...
How it works...
There's more...
What about the WCF RIA Services link in the Silverlight client?
Better naming, no templates
See also
Getting data on the client
Getting ready
How to do it...
How it works..
There's more...
Some details on code generation
Aren't there some properties missing?
Excluding some properties
See also
Using LoadBehavior to control what happens to your data once it's sent to the client
Getting ready
How to do it...
How it works...
See also
Controlling the server-side query from the client
Getting ready
How to do it...
How it works...
There's more...
See also
Sorting and filtering data on the server
Getting ready
How to do it...
How it works...
There's more...
See also
Paging through your data
Getting ready
How to do it...
How it works...
See also
Persisting a change set/unit of work
Getting ready
How to do it...
How it works...
There's more...
See also
Working with concurrency and transactions
Getting ready
How to do it...
How it works...
See also
12. Advanced WCF RIA Services
Introduction
Tracking a user's identity default Windows authentication
Getting ready
How to do it...
How it works...
See also
Tracking a user's identity — a custom authentication service
Getting ready
How to do it...
How it works...
See also
Integrating Windows Identity Foundation with WCF RIA Services
Getting ready
How to do it...
How it works...
See also
Controlling a user's access to services and service methods
Getting ready
How to do it...
How it works...
There's more...
See also
Validating data: using data annotations
Getting ready
How to do it...
How it works...
There's more...
See also
Validating data: writing a custom validator
Getting ready
How to do it...
How it works...
There's more...
See also
Validating data: server-side validation with client-side feedback
Getting ready
How to do it...
How it works...
There's more...
See also
Validating data: triggering validation when needed
Getting ready
How to do it...
How it works...
There's more...
See also
Validating data: using the ValidationContext
Getting ready
How to do it...
How it works...
There's more...
Why is my Validation.Items collection sometimes empty?
See also
Handling errors on the server
Getting ready
How to do it...
How it works...
There's more...
See also
Using SQL Azure with WCF RIA Services
Getting ready
How to do it...
How it works...
There's more...
See also
Exposing WCF RIA Domain Services as OData endpoints
Getting ready
How to do it...
How it works...
See also
Exposing WCF RIA Domain Services for other technologies
Getting ready
How to do it...
How it works...
There's more...
See also
13. Windows Phone 7
Introduction
The sample scenario for this chapter
Getting our environment ready to start building Windows Phone 7 applications
How to do it...
Building your first data-driven Windows Phone 7 application
Getting ready
How to do it...
How it works...
Application model, a device, and the emulator
Pages, navigation, and orientation
Application Bar
Isolated Storage
Panorama and Pivot
See also
Getting data on your Windows phone 7 using WCF
Getting ready
How to do it...
How it works...
ASMX services
WCF services
Data transfer
Credentials
What works and what doesn't work
See also
Accessing REST services from Windows Phone 7 using XML
Getting ready
How to do it...
How it works...
See also
Accessing REST services from Windows Phone 7 using JSON
Getting ready
How to do it...
How it works...
Why JSON?
See also
Working with push notifications using the cloud
Getting ready
How to do it...
How it works...
There's more...
Storing data in a local SQL CE database
Getting ready
How to do it...
How it works...
The database context
The model classes
Interaction with the database
Save often
See also
Using the background transfer service
Getting ready
How to do it...
How it works...
Restrictions
A. Appendix
Creating a REST service from WCF
Installing an SQL Server database
Attaching an MDF file
Executing a query file
Working with Fiddler
Local traffic
Working with the Silverlight control toolkit
Working with WIF
Installing the WCF RIA Services Toolkit
Installing and using NuGet
← Prev
Back
Next →
← Prev
Back
Next →