Silverlight is a browser plug-in that runs Rich Internet Applications. It brings a trimmed down version of the .NET Framework to web browser client-side programming. It also provides a user interface framework that is very similar to WPF, enabling developers familiar with WPF to learn Silverlight with ease. This course shows the main aspects of building user interfaces with Silverlight 4.
Ian is an independent consultant, developer, speaker, and author. He has written books on Windows Presentation Foundation, Windows Forms, and Visual Studio. He lives in London but can often be found on various developer mailing lists and newsgroups, where a popular sport is to see who can get him to write the longest email in reply to the shortest possible question.
Introduction Hello. I'm Ian Griffiths, and this is the Core Silverlight course from Pluralsight. Silverlight is a platform for building rich internet applications. This course will explain the concepts behind Silverlight, and will show how to build it into your web applications. We'll start with a quick tour around the most important features of Silverlight before getting down to details in the rest of the course. In particular, we'll look at why Silverlight exists at all, because to understand the design decisions Microsoft made it helps to know what problems Silverlight is designed to solve. We'll look at the various versions of Silverlight, seeing which operating systems and browsers are supported. We'll look at Xaml, the Extensible Application Mockup Language, which is the language we use to construct Silverlight user interfaces. We'll see how code fits in with Xaml to make our Silverlight programs interactive. And we'll look at the tools typically used to create and design Silverlight user interfaces, that's Visual Studio and Expression Blend.
Getting Started with Visual Studio 2010 This talk provides a quick tour around the Silverlight features in Visual Studio 2010. We'll look at the Xaml design surface and associated tools. We'll look at the basic Silverlight Application template, and we'll see how applications are associated with the hosting websites. We'll look at the other Silverlight templates Visual Studio offers, and we'll take a quick look at the unit testing facilities available for Silverlight code.
Layout In this section, we're going to look at Silverlight's Layout Services. We'll start by looking at simple fixed layouts. Then we'll look at the Dynamic Layout scenarios Silverlight's designed to support. We'll see the layout-related properties and concepts that permeate all user interface elements. We'll see how to write an application that can run with a full screen layout, and we'll look at the relationship between HTML layout, and a Silverlight plug-in.
Input Handling In this section, we're going to see how to handle user input in Silverlight applications. We'll look at mouse input, touch handling, including multi-touch. We'll see how to handle keyboard input. We'll look at how some input events bubble through the user interface tree, and we'll also look at how some kinds of inputs are better handled at a higher level by using controls. As you've seen in previous talks, each Xaml file is usually associated with a code behind file. Just to recap, the Xaml and code behind both contribute to the class definition. The connection is established with the x:Class attribute. Any named elements in the Xaml are automatically available as. NET objects in the code behind, so you can attach event handlers, and modify properties. In this talk, we're going to be looking at a bit more detail of the events available for handling input.
Applications, Resources, and Deployment In this section, we're going to look at common issues around creating and deploying applications and the resources they need. We'll begin by looking at a bit more detail of the process by which the Silverlight plug-in and content is loaded. We'll also look at the. xap file format used to distribute Silverlight content. We'll explore the various options of packaging any binary resources your Silverlight applications may depend on, such as bitmaps and media files. We'll also look at Silverlight's other resource mechanism, which deals with the resources more naturally represented as Xaml than binary. We'll look at the Application class, which provides access to various application-wide services and features. And we'll also look at the Application class's support for application extensions, which are objects that can coordinate work with a lifecycle of the application.
Out of Browser Applications We're now going to explore Silverlight support for applications that can be installed on the end user's machine to run outside of the web browser like a normal Windows application. We'll start by looking at how to enable out-of-browser execution for your application in Visual Studio, and we'll see the various project settings for this kind of application. We'll also look at how debugging works slightly differently for out-of-browser apps. We'll see how to install out-of-browser applications and then keep them up to date. We'll look at how to declare that your application requires elevated trust enabling it to perform work that would normally be prevented. We'll also see how out-of-browser applications can manage the application windows and display notification popups. Finally, we'll look at how the WebBrowser control makes it possible to work with HTML content, even once you've moved your Silverlight application out of the browser.
File Access In this talk, we'll see how Silverlight applications can access files on the end user's computer. We'll start by reviewing the options Silverlight offers for file access. We'll then look at each of these in turn. We'll see how the file dialog classes let the user stay in control of which files your application uses. We'll look at how trusted applications can make broader use of classes in the System. IO namespace to access files. And finally, we'll look at Silverlight's Isolated Storage mechanism.
View Models In this talk, we'll be looking at an important technique in Silverlight's software development, the use of View Models. We'll start by looking at some problems that can occur in user interface software development, and we'll see how a technique called separated presentation can help. View Models offer one way of achieving separated presentation, and we'll see how they exploit Silverlight's data binding to reduce the amount of code needed in your user interface. And finally, we'll look at how you can use command objects to let View Models respond to input.
Printing Printing is an important capability for certain kinds of applications. In this talk, we'll look at the relevant facilities in Silverlight. We'll look at the printing API, and the basic steps that all Silverlight applications must perform if they want to print. We'll then look at the various options for choosing water print. The simplest is to print a copy of user interface elements that are already on the screen. Most applications will want to get a bit more advanced than this, and generate content adapted specifically for printing, and in some cases, it'll be necessary to split the content across multiple pages.