ATSIL4 - Silverlight 4 Using C#

Microsoft’s Silverlight is a new client-side Web technology that enables the implementation of visually stunning Web applications that depend only on a small, easy-to-install plug-in that works in browsers for both Windows® and Macintosh®. Silverlight 4 provides a cross-platform and cross-browser implementation of the .NET Framework. Out-of-browser support enables Silverlight applications to run disconnected from the Internet. Silverlight applications can be implemented in .NET languages such as C# and Visual Basic as well as in JavaScript. This four-day course provides the C# programmer with a thorough foundation in Silverlight 4. After introducing the Silverlight plug-in and SDK and the programming model for Silverlight, the course provides a thorough survey of Extensible Application Markup Language (XAML), which is also the foundation of Windows Presentation Framework (WPF). The course then shows how to use Silverlight to draw shapes, lines, text and images. Layout is discussed in detail, including sizing and positioning of controls and the use of panels. Event handling is covered. There is an introduction to Silverlight animation and the use of video and audio. The last part of the course covers topics in networking, data controls and data binding, and data access. An appendix covers transforms in Silverlight, which can be used to achieve various special visual effects.

Instructor did a great job, from experience this subject can be a bit dry to teach but he was able to keep it very engaging and made it much easier to focus. Student
Excellent presentation skills, subject matter knowledge, and command of the environment. Student
Instructor was outstanding. Knowledgeable, presented well, and class timing was perfect. Student

Click here to print this page »


A basic understanding of Web application development using HTML and programming experience in .NET using C#. Some exposure to JavaScript™ would be helpful but is not essential. A basic knowledge of ADO.NET is also desirable for the data access chapter.

Detailed Class Syllabus

Introduction to Silverlight

What Is Silverlight?
Silverlight and AJAX
Silverlight and Flash
Installing the Silverlight Plug-In
Silverlight Tools
Hello Silverlight
Allowing Blocked Contact
JavaScript Helper Functions
Using Silverlight.js
Using createObjectEx()
Width and Height in Per Cent
Providing for User Plug-In Download
Automatic Plug-In Download

Programming Silverlight

Silverlight Programming Models
Interactive JavaScript Applications
Using the Document Object Model
JavaScript Code
XAML Files
Using Visual Studio 2010
Hosting the Silverlight Application
Designer Support
Layout Panels
Using a StackPanel
Handling Events in Managed Code
Events Window
Adding Events in XAML
Code-Behind File
Names of XAML Elements
Silverlight Controls
Application Package (.xap)

Using XAML

Windows Presentation Framework
What Is XAML?
Missing XML Namespace
Default Namespace
as the Root Element
An Opaque Ellipse
Property Element
Type Converters
Content Element Syntax
Collection Syntax
Implicit Collection Syntax
Attached Properties
XAML and C#
Assigning Property Values
Using the XAML Namespace
Assigning Simple Properties
Properties Attached to Canvas
Assigning Attached Properties
Navigating from the Root
Code-Behind File
Using an Event Sender
Handling an XAML Event

Shapes and Lines

Size and Position
Rectangle and Ellipse
More Shape Properties
Opacity and Visibility
Receiving Mouse Events
Dashed Lines
Arc Segments
Bezier Curves

Texts and Fonts

Text Wrapping
Font Attributes
Font Families
Font Weights
Additional TextBlock Properties
TextBlock Dimensions
ActualWidth and ActualHeight
Rich Text Content
Run and LineBreak

Brushes and Images

Predefined Color Names
RGB Color Space
Enhanced RGB Color Space
Gradient Brushes
Linear Gradient Brushes
Default Gradient Axis
Horizontal and Vertical Gradient Axis
Color Interpolation Mode
Spread Methods
Repeat and Reflect
Alpha Channel Changes
Painting Other Shapes
Radial Gradient Brushes
Using an ImageBrush with Text
Stretch Property
Code-Behind File


Layout in Silverlight
Controlling Size
Margin and Padding
Thickness Structure
Using the Collections Editor
Star Sizing
Positioning on a Canvas
Moving Elements

Handling Events

Events in Silverlight
Event Handlers in XAML
Adding/Removing Event Handlers
Loaded Event
Mouse Events
Microsoft Silverlight Configuration
C# Code
Rubber-Band Drawing
Naïve Implementation
drawRect() Helper Function
Final Implementation
Drag and Drop
Drag and Drop – XAML File
Drag and Drop – Code-Behind
Capturing the Mouse
Routed (or “Bubbled”) Events

Animation and Media

Manual Animation
Silverlight Animation
Storyboard Methods
User Interface
ColorAnimation – Code-Behind
Audio and Video
Loose Files as Resources

Application Structure and Networking

Silverlight Application Structure
A Simple Package
Application Package
Application Manifest
Application Class
XML Processing
Image Resource Files
Resource File in a Component
Resource File in the Package
Application Library Caching
External Parts
CopyLocal is False
Using WebClient
Downloading Content on Demand
DoanLoadImage Code

Web Services

Accessing Web Services in Silverlight
EchoREST Web Service
Web Service Proxies
Windows Communication Foundation
EchoSOAP Web Service

Data Controls and Data Binding

ListBox Control
Auto-Implemented Properties
Using Items Property
Deleting a Book
Binding to a Collection
DataPager Control
DataGrid Control
Paging with DataGrid
Sorting with DataGrid
More about Data Binding
Dependency Properties
Binding Object
ElementName Binding
Binding to a CLR Object
Change Notification
Updating the Book Object
Notification with Collections
Book Class
Updating Collection Elements
Notification by Collection Elements
Notification in Book Class

Data Access

Accessing Data on the Server
SmallPub Database
ADO.NET Entity Framework
SmalPub Tables
SmallPub Entity Data Model
Entity Data Model Concepts
Querying the EDM
Class Diagram
Context Class
List of Categories
List of Books
Language Integrated Query (LINQ)
Modifying a Data Source
Entity Framework in a Class Library
Data Access Class Library
Client Code
Silverlight Database Clients
Adding a Web Service
Consuming a Web Service
Modifying the Configuration File
Auto-Generated Columns
WCF Data Services
Choosing Data Objects
WCF Data Service Template
DataService Class
A REST-based Web Service
Disabling Feeds
Open Data Protocol (OData)
OData and WCF Data Services
URI Conventions
Resource Path Options
Query String Options
OData Operations
A Console Client
A Silverlight Client
Accessing XML Data
Accessing an XML File
Using LINQ to XML
Isolated Storage
Isolated Storage Store
Saving Data to a File
Loading Data from a File
Deleting a File

Additional Features

HTML Bridge
HAMTL and JavaScript
HtmlPage Class
JavaScript from Managed Code
Managed Code from JavaScript
Out-of-Browser Support
Configuring Out-of-Browser Support
Installing Out-of-Browser
Running Out-of-Browser
Application Manifest
Elevated Trust
Print Dialog Box
Printing Code
Clipboard Access