Instructor-led training
Silverlight 5 Training in Sussex, Wisconsin
Microsoft's Silverlight is a 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.
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in Sussex, Wisconsin or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
1. Introduction to Silverlight
What Is Silverlight?
Silverlight and AJAX
Silverlight and Flash
Silverlight Tools
XAML
XHTML
Automatic Plug-In Download
Using Visual Studio 2010
Hosting the Silverlight Application
MainPage.xaml
MainPage.xaml.cs
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)
2. Using XAML
Windows Presentation Framework
What Is XAML?
Root Element
Default Namespace
XAML Namespace
Canvas
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
XamlReaderLoad()
BrushFromString()
Navigating from the Root
MainPage.xaml
Code-Behind File
Using an Event Sender
Handling an XAML Event
3. Shapes and Lines
Shapes
Size and Position
Rectangle and Ellipse
MainPage.xaml
MainPage.xaml.cs
More Shape Properties
Opacity and Visibility
Receiving Mouse Events
Polygon
Line
Dashed Lines
Polyline
Path
Arc Segments
Bezier Curves
Clipping
4. Texts and Fonts
TextBlock
Text Wrapping
Font Attributes
Font Families
Font Weights
Additional TextBlock Properties
TextBlock Dimensions
ActualWidth and ActualHeight
Rich Text Content
Run and LineBreak
5. Brushes and Images
Brushes
SolidColorBrush
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
GradientOrigin
ImageBrush
Using an ImageBrush with Text
Image
Stretch Property
Code-Behind File
6. Layout
Layout in Silverlight
Controlling Size
Margin and Padding
Thickness Structure
Alignment
Panels
Grid
Using the Collections Editor
Star Sizing
Grid.ColumnSpan
Positioning on a Canvas
Moving Elements
Z-Order
Clipping
7. Handling Events
Events in Silverlight
Event Handlers in XAML
Adding/Removing Event Handlers
Loaded Event
Mouse Events
Microsoft Silverlight Configuration
MouseEventArgs
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
8. Animation and Media
Manual Animation
Silverlight Animation
Storyboard Methods
User Interface
DoubleAnimation
ColorAnimation
ColorAnimation – Code-Behind
PointAnimation
Audio and Video
Resources
Loose Files as Resources
9. 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
Location to DLL to Download
Downloading Content on Demand
DownLoadImage Code
10. Web Services
Accessing Web Services in Silverlight
REST
EchoREST Web Service
SOAP
Web Service Proxies
Windows Communication Foundation
EchoSOAP Web Service
11. Data Controls and Data Binding
ListBox Control
Book.cs
Auto-Implemented Properties
Using Items Property
Deleting a Book
Selection
Binding to a Collection
DataPager Control
DisplayMode
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
INotifyPropertyChanged
Notification with Collections
Book Class
MainPage.xaml.cs
Updating Collection Elements
Notification by Collection Elements
Notification in Book Class
12. 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)
IntelliSense
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
BookModel.edmx
WCF Data Service Template
DataService Class
A REST-based Web Service
Disabling Feeds
Open Data Protocol (OData)
OData and WCF Data Services
OData Feeds
Medata for OData 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
13. Additional Features
HTML Bridge
HTML 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
Printing
Print Dialog Box
Printing Code
Clipboard Access
14. New Features in Silverlight 5
3D Graphics in Silverlight
XNA SoundEffect API
Audio File Formats and Codes
Audio Files on the Web
Downloading Audio Files
Audio File Conversion
Using the SoundEffect Class
Variable Rate Playback (Trick Play)
Trick Play Example Code
Trusted Applications
PivotViewer Control
PivotViewer Features
Utility Class
DemoItem Class
PivotViewer Collection
PivotViewer Assembly and Namespace
PivotProperties
Running the Example
Some Experiments
Color Converter
Template Definition
Breakpoints in XAML Data Binding
XAML Data Binding Enhancements
Where Silverlight development gets difficult
The C# is familiar to most attendees. The harder part is the declarative, asynchronous, sandboxed model around it. The syllabus builds that model in layers.
- XAML as an object graph. Chapter 2 covers property elements, type converters, content and collection syntax, and attached properties such as those on a Canvas. It also shows how XAML and C# interact, using XamlReader.Load() and navigating from the root element. A common misconception is that XAML is markup that styles a page. It actually instantiates and configures .NET objects.
- Layout rules. Chapter 6 covers Margin and Padding, alignment, Grid star sizing, Grid.ColumnSpan, Canvas positioning and z-order. Developers used to HTML flow layout often find the Grid and Canvas models counterintuitive.
- Events. Chapter 7 covers mouse capture, drag and drop, rubber-band drawing, and routed ("bubbled") events. Learners often assume every event bubbles. Routed events need a clear mental model.
- Data binding. Chapter 11 covers dependency properties, ElementName binding, and binding to CLR objects. It also covers change notification with INotifyPropertyChanged, including notification within collections and collection elements. Binding failures are typically silent, which makes the notification chapters the ones to work through slowly.
- Asynchronous access to the server. Chapters 9, 10 and 12 cover WebClient downloads, on-demand assembly loading, application library caching, SOAP and REST services, WCF Data Services and OData. Results arrive later, so code ordering and error handling differ from desktop habits.
The topics build in sequence: XAML, then shapes, text and brushes, then layout and events, then animation, then packaging and networking, then data. The final chapter adds Silverlight 5 features such as 3D graphics, the XNA SoundEffect API, trick-play audio, trusted applications, the PivotViewer control, and breakpoints in XAML data binding.
Who this course suits and what to take around it
The course is general level and runs four days. It suits C# developers who know basic HTML-based web development and want to build or maintain Silverlight 5 client applications. Training managers with existing Silverlight code to support will find the packaging, networking, out-of-browser and HTML bridge chapters directly relevant.
If your C# is rusty, start with .NET Framework Using C#. The course assumes working C# throughout, including auto-implemented properties, LINQ and event handlers. The data access chapter covers the Entity Framework, LINQ and WCF Data Services. Attendees new to database programming benefit from ADO .NET Using C#, because the syllabus's prerequisites call for basic ADO.NET knowledge there.
For teams planning to move user interfaces to server-rendered web applications, ASP.NET Core MVC (VS2022) is a natural follow-on. The service and data-access concepts from this course carry over, while the client technology changes.
The syllabus uses Visual Studio 2010, whose extended support ended in July 2020. Organizations on other tooling versions can ask about tailoring through a training proposal.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- Maintaining an internal data-entry application. A team might inherit a Silverlight client that lists records in a DataGrid with paging and sorting. Chapter 11 (DataGrid, DataPager, change notification) and chapter 12 (a WCF Data Service exposing OData feeds) address how such a screen reads and updates data.
- Offline-capable tools. A team might need an application that runs outside the browser and saves work locally. Out-of-browser configuration and installation, elevated trust, printing and clipboard access (chapter 13), and isolated storage for saving and loading files (chapter 12) map to that need.
- Embedding a rich control in an existing web page. A group might need to exchange data between page JavaScript and a Silverlight component. The HTML bridge covers calling JavaScript from managed code and the reverse. The packaging and on-demand download topics in chapter 9 help keep the initial load small.
Using AI coding assistants with Silverlight code
AI coding assistants are useful for repetitive pieces. They can draft XAML layouts with Grid definitions and star sizing, write boilerplate INotifyPropertyChanged classes, and propose LINQ queries against an Entity Data Model. They can also explain an unfamiliar XAML fragment.
They tend to fail in the places this course emphasizes:
- Wrong API surface. Silverlight runs a reduced subset of the .NET Framework, and assistants often suggest WPF-only or desktop-only members that do not exist in a Silverlight 5 project. Compile every suggestion in a real Silverlight project.
- Synchronous thinking. Suggested code may assume a service or download returns immediately. Check that WebClient, service proxy and WCF Data Services calls handle asynchronous completion and errors.
- Silent binding errors. A generated binding can look right and show nothing. Verify with the XAML data binding breakpoints covered in chapter 14, and confirm that change notification fires for collection items.
- Trust and sandbox limits. Generated code may use file, clipboard or printing features that require out-of-browser or elevated trust. Test in both modes.
Treat generated code as a draft. Run it in the browser, step through the bindings, and review any network or storage code line by line.
Frequently asked questions
What level is this course, and what should I know first?
It is general level and lasts four days. You should have a basic understanding of web application development with HTML and programming experience in C#. Basic ADO.NET knowledge is desirable for the data access chapter.
What does the course cover?
It covers XAML, shapes and lines, text and fonts, brushes and images, layout, event handling, animation and media, application structure and networking, and SOAP and REST web services. It also covers data controls and binding, data access with the Entity Framework and WCF Data Services, additional features such as the HTML bridge and out-of-browser support, and Silverlight 5 additions such as PivotViewer and 3D graphics.
Can this course be delivered privately for our team?
Yes. HSG delivers private training for organizations, either onsite at the client's location or live online.
Can the content be customized?
Private course content can be customized, including tailoring to the technology versions your organization uses. You can describe your needs through the training proposal request.
Training locations
Silverlight 5 training across the U.S. and beyond.
We provide private Silverlight 5 training for organizations, onsite at your location or live online, throughout the United States and internationally.
View all Silverlight 5 training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.