Microsoft Silverlight 4 Tutorials You Must Read

Posted by: Suprotim Agarwal , on 7/13/2011, in Category Silverlight 2, 3, 4 and 5
Views: 127694
Abstract: In this link list, I plan to share 70 Silverlight Tutorials written by authors of DotNetCurry and DevCurry that should be helpful for every Silverlight developer out there.

We (authors of DotNetCurry.com and DevCurry.com) have been writing tutorials that cover various features on Silverlight 4 and Silverlight 5. These tutorials cover using various Silverlight controls like the DataGrid, DataBinding in Silverlight, Security, Communication in Silverlight using JSON, OData, WCF etc. , using Silverlight COM Automation features to interact with MsOffice tools and so on. In this article, I plan to share 70 such articles that will be helpful for every Silverlight developer out there.

The articles listed here are quite a mouthful. So make sure to bookmark this link and share it with fellow developers via twitter. Also make sure to use the comments section and give us any feedback you have.

Here’s a list of 70 Silverlight 4 and 5 tutorials for you to read -  

Silverlight, DataGrid and Data Binding Tutorials

Data Validation in Silverlight using Data Annotations and Data Form - While using Silverlight for developing Line-of-Business applications, the DataForm control is recommended for performing DML operations. This control provides data pagination, insert, and update and delete operations on the records. This control provides ItemsSource property which accepts collection type as an input e.g. ObservableCollection. But while performing Insert and Update operations, it is important to perform Data Validations

Silverlight 4: Binding Enum with ComboBox - In this article, we will explore the mechanism of Binding Enumeration data with the ItemsControls family in Silverlight. The Enum can be read as a Type and the contents in it can be read as Fields using BindingFlag. After reading these Fields, then they can be added to any collection class e.g. ObservableCollection<T> and then this can be used for DataBinding with Silverlight UI elements

Silverlight 4: Hide/Unhide DataGrid Columns - Silverlight DataGrid is a nice control provided for Data representation as well as manipulation. Since this control provides its object model separately e.g. DataGridColumn, DataGridColumnHeader etc, it is very easy for us to provide custom data representation capability to this control. In this article, I have demonstrated how to hide/unhide DataGrid columns depending on the user selection

Silverlight 4 DataGrid Filtering using DataGridColumnStyle - In Silverlight 4, the DataGrid control provides many features for effective data representation. I must say that most of the end-user’s requirements for Tabular Data representation and interaction can be easily accomplished using the DataGrid control. Let’s consider a scenario where the end-user is working on a Silverlight application where the data is displayed using DataGrid and he wants to filter the data in the column using some control in the Row Header, something similar to that in Microsoft Excel.

Silverlight 4: Nested DataGrid for Master-Details Scenarios - The Silverlight DataGrid is a very commonly used control for displaying huge amounts of data. Similarly to save screen space and display Master-Details scenarios, a Nested DataGrid is recommended.

Silverlight: Data Validations in DataGrid - While developing Silverlight Line-of-Business (LOB), application data validation becomes a very important aspect of UI application development. So if an end-user is using DataGrid for performing Insert or Update operations, then data validations while inserting or updating should be handled. Silverlight provide the facility of using IDataErrorInfo interface for validation logic. The data model class needs to implement this interface and then the concerned logic for a specific property can be written.

Silverlight 4: Deleting Multiple Rows from the DataGrid - As a Silverlight 4 application developer, I use the Silverlight DataGrid control very frequently. The DataGrid is an excellent control provided for displaying data and manipulating it.In this article, I have explained the technique of deleting multiple rows in a DataGrid.

Silverlight 4: StringFormat for DateTime Conversion - In this article, we will see how to use StringFormat property to format the DateTime while binding it to a UI element like Text Box or other similar elements.

ListBox Paging in Silverlight 4 using DataPager control - Prior to Silverlight 4, implementing paging in an application would require the developer to create controls, that would allow the user to move from one page to another. With the introduction of DataPager control in Silverlight 4, this task has become much simpler. Let us see how.

Motion Path in Silverlight 4 using PathListBox - In this article, we will see how to align the text to a given path using a ‘PathListBox’ control, in Silverlight 4.0. We will also see how to animate the text using Visual states in Silverlight.

Silverlight 4 DataGrid: Load a CSV file - In this article we will see how to load a CSV file (Comma Separated File) into a Silverlight 4 DataGrid control

Silverlight 4: DataBinding with Anonymous Types - In this article, we will see how to bind Anonymous types with Silverlight 4.0 controls. For this demonstration, we will use the Silverlight ‘Datagrid’ control and also some LINQ.

Accessing Local Database using Silverlight 4 - In this article, we will explore the mechanism of communicating with the local SQL Database using the out-of-browser features of Silverlight 4.0 with elevated trust permissions.

Silverlight and JSON - Consume JSON Services for Performing DML Operations in Silverlight 4 - When using Silverlight 4 for Line of Business (LOB) applications, it is important to make use of WCF services for fetching and updating data to and from SL to WCF. WCF actively makes use of Representatial State Transfer (REST) and JavaScript Object Notation (JSON) for data communication. In the following article, I will be explain how to consuming WCF-JSON in Silverlight 4.0 application.

Silverlight: Add a CheckBox to a TreeView and Handle Events - Let us see how to add controls like the CheckBox to a TreeView. Creating a TreeView is quite simple. You can either explicitly define items in the XAML file or bind data programmatically.

Silverlight TreeView DataBinding Example with HierarchicalDataTemplate - In this post we will see how to programmatically databind a Silverlight TreeView control using the HierarchicalDataTemplate.

Change Silverlight DataGrid Style based on Mouse Actions - Although WPF supports Property Triggers for applying different styles on controls like DataGrid based upon User Action (e.g. MouseEnter etc.), Silverlight does not have inbuilt support for the same. To make this possible in Silverlight, we need to take advantage of Styles and Events

Silverlight 4: Master Details with two DataGrid - In cases where you are fetching data from Master/Detail (Parent-child) relationship tables, users demand a functionality where the Silverlight page contains two DataGrids for holding Parent and Child table data respectively. When a row from parent DataGrid is selected, the child DataGrid should display the data from the child table. To achieve this, you can work with minimum code-behind and make effective use of the DataBinding features of Silverlight 4.0. In the small snippet shown below, I have explained the way of achieving this requirement using DataBinding features of Silverlight.

Silverlight 4 Chart Example - The Silverlight Toolkit contains controls like the Chart control to make data visualization easy. Let us see an example of using Silverlight 4 Charts in your applications.

Format Date in Silverlight 4 - In Silverlight 3, to format a date, you needed to write a Converter class that implemented the IValueConverter interface and you needed to implement the Convert and ConvertBack methods. Silverlight 4 introduces the StringFormat binding property that makes formatting absolutely simple

Displaying Images in Silverlight 4 DataGrid using Converter - Silverlight 4 being a technology for Line-Of-Business (LOB) application has provided lots of features to developers. One of the nice features is implementing value converters.

Silverlight DataGrid - Performing DML Operations (Update, Delete and Insert) - In this article, we will see how to perform Insert, Update and Delete operations in the Silverlight DataGrid.

Querying Netflix OData Service using Silverlight 4 - In this article, we will see how to consume the Netflix OData service and display data in a Silverlight DataGrid control.

Effective Data Representation in Silverlight 4.0 using TargetNullValue, StringFormat and FallbackValue - A common issue that I hear from my clients regarding data representation in Silverlight ItemsControls is that while fetching data from service and displaying in a DataGrid, some data values (especially string) are sometimes Null and also some numeric values need to be represented in a currency format.

Data Validation in Silverlight 4.0 - Silverlight 4.0 has several new features and it has been listed down well over here. One of the most exciting features of Silverlight 4.0, is its capability for building Line-of-Business (LOB) applications

Silverlight 4: Using Commanding Parameters for Performing Insert Operations - In my previous article, Silverlight 4 – Using Commanding Feature to Fetch data from a WCF 4.0 service, we explored the new commanding support provided to Silverlight 4.0 applications and how commanding provides easy and flexible code-less development mechanism. In this article, we will explore how to use the Commanding Parameters to perform DML Operations (Insert).

Silverlight 4.0 - Using Commanding Feature to Fetch data from a WCF 4.0 service - Command is a class that supports the ICommand interface and lets you data bind specific operations in your application. In Silverlight 4, there is a new pair of properties added to the ButtonBase and Hyperlink classes named Command and CommandParameter that lets you do so.

TreeView Drag Drop in Silverlight - I have seen plenty of questions around drag-drop operations within a TreeView and I thought of dedicating a post to it. This article shows you how easy it is now to do a Drag Drop operation on a TreeView in Silverlight

Silverlight 4: End-to-End Application using Prism 4, WCF 4 and DataGrid Custom Behavior - With the support for Prism 4 and the growing popularity of Silverlight 4 for line-of-business application development, there is a lot of buzz amongst developers to use the new features these technologies has to offer. So for example, I have observed that the demand for providing a simple and more interactive UX for developing DML UI using DataGrid is increasing. In this article, we will cover just that. I have explained the mechanism for performing CRUD operations using the Silverlight 4 DataGrid and have used SL 4, Prism 4 and WCF 4.0, along with DataGrid Custom behavior.

 

Silverlight 4 Tutorials covering various features and Silverlight communication

Assembly Caching in Silverlight 4 for Performance Gains - The smaller the XAP file, the quicker your application loads. Assembly caching in Silverlight 3 and 4 does exactly that. Let us understand what assembly caching is.

Silverlight 4.0: Duplex Communication over Http using PollingDuplexHttpBinding - In a real world application, many-a-times it is required that the application performs a two-way communication i.e. the client application sends request to the service and then service should have capability to initiate action itself and send the data back to the client. In Silverlight, we can perform this kind of operation using Socket programming as well as using Duplex bindings. In Silverlight 4.0, we can do this using net.tcp binding. In this small article, I have used Polling Duplex communication

Silverlight 4.0 - Uploading Multiple Files to the Server - This article demonstrates how to upload multiple files to the server using Silverlight 4.0

Localize a Silverlight 4 Application - In this article, I will demonstrate how to localize a Silverlight 4 application. In simple words, localization is the customization of applications for a given culture or locale.

Silverlight 4: Consuming WCF REST Service using JSON - A nice feature of WCF programming is the support for REST and JSON, using which a client can communicate with the WCF service without using A proxy. In this article, I have used a Silverlight 4 client application to make a call to WCF service using JSON.

Silverlight 3D: Using Plane Projection - In this article, we will see how to use 3D Plane Projection in Silverlight. For this demonstration I am using the following controls –  Border, DataGrid, Chart control from Silverlight toolkit and Hyperlink button. I am also using two story boards for creating a ‘Double Animation’.

Silverlight 4: Introduction to Behaviors - In this article, I will introduce you to Behaviors in Silverlight. We will also create a small demo of the ‘MouseDragElementBehavior’ behavior using Expression Blend 4. So, let’s get started.

Silverlight 4: SketchFlow for Prototyping UI using Expression Blend 4 - In this article, we will see how Silverlight 4.0 and Expression Blend SketchFlow helps in designing deep dive prototypes for a product.

Silverlight: Synchronizing Data between ListBox and Textboxes - In Silverlight applications, a common requirement is to to synchronize data between two controls, like the ListBox and TextBox control bound with the same data source. A ListBox accepts a collection using the ItemsSource property. So when you select any item from the ListBox, the SelectedItem property returns the single object from the collection bound with the ItemsSource. To synchronize data between a ListBox and TextBox (or other elements), we can use the XAML binding facility provided in Silverlight using SelectedItem property of the ListBox

Silverlight: Debug Out Of Browser application - Why would you need to debug Silverlight applications running out of the browser? One reason is to test applications that use Elevated Trust. Let us see how simple it is to debug applications running out of the browser

Silverlight 4: List Audio and Video Devices - In this post, we will see how to use Silverlight to list the available audio and video devices on your system. We will list this information into separate ComboBoxes.

Webcam Support in Silverlight 4 to capture Video - Silverlight 4 support for audio capture devices and video capture devices (Webcam), has opened up a new range of possibilities like recording, snapshot etc. In this short article, we will see how simple it is to use a Webcam in Silverlight 4.

Silverlight FAQ – 13 Questions for Beginners - This article contains a Silverlight FAQ (Frequently asked questions) to help those who are new to Silverlight or plan to get started with Silverlight.

Line of Business (LOB) Application using Silverlight 4, WCF 4, EF 4 and Commanding Architecture - In this article, we will see how to create a sample LOB application using Silverlight 4.0. We will see how different application layers in Silverlight 4.0 can be isolated from each other. Since the UI is not associated with any compiled code, even if a layer is changed, it does not require any recompilation of the UI.

Exception Handling in Silverlight 4 – Manage Unhandled Exceptions - A good practice to follow is to handle the exception where it occurs, using the try-catch block. However there could be certain areas in your code where unknown exceptions crop up. If the exception is not handled by your application, the exception reaches the Silverlight plug-in and the application ends abruptly.  In order to manage unhandled exceptions gracefully, Silverlight has the Application.UnhandledException event.

Increase Isolated Storage Quota in Silverlight - Silverlight provides a mechanism called Isolated Storage to store data on the client computer. This mechanism is provided to ensure a safe browsing experience, as your application cannot directly access the user’s local file system. So in order to persist data like application state or user settings/preferences, you use a virtual file system called Isolated Storage.

Display HTML in Silverlight using WebBrowser - Silverlight 4 introduces the WebBrowser control using which you can now display HTML based content in Silverlight

Silverlight 4 Color Palette - In this post, we will see how to read all the colors from ‘System.Windows.Media.Colors’ class and create a color palette in Silverlight. This class contains every color as a property of the structure ‘System.Windows.Media.Color’ type. With the help of reflection, the ‘Colors’ class can be loaded.

Display Text Right-To-Left in Silverlight 4 - Silverlight 4 comes with a new FlowDirection property that helps set the direction of text. This new property is particularly useful for Arabic text that flows from right-to-left.

Silverlight 4 - Trim Text in a TextBlock and display Ellipses instead - Silverlight 4 introduces the TextTrimming property which adds an ellipses(…) when the text overflows the edge of its container. This article shows how to use this property.

Silverlight 4.0 - Secure Communication to WCF service using Custom User Name and Password Validator - Most of the times, when you develop an application that communicates to a service-oriented solution (like WCF services), it becomes necessary that the service must have some mechanism for authenticating the user, who is making a call to the service.

Silverlight 4.0 - Calling Secured WCF 4.0 Service hosted with SSL and Self-Signed Certificate - In this article, I have explained the procedure of creating a Web Site with SSL enabled and configuring self-signed certificate. I then explain how to create WCF Services with Custom Binding and then consume the secured WCF service using Silverlight 4

Silverlight 4.0 and Network Authentication while performing Web Request - In this article, I will demonstrate how to make a Web request to an external service using the Network Authentication feature . This mechanism helps making call to external services from the Silverlight 4.0 client by using the credentials, as demanded by the service.

Right Click a TextBox and Display a ContextMenu using Silverlight 4 - In versions prior to Silverlight 4, when you right clicked an UI Element, the events were handled by the Silverlight plug-in internally to display the Silverlight configuration dialog

Printing Support in Silverlight 4 - Silverlight 4 is released and it comes with a whole set of new features. One of the new features added in Silverlight 4 is the support for printing. This was a much needed feature especially when creating business/enterprise applications. In this article, we will see how to use the printing API in Silverlight 4.

Deploy Silverlight Application using SharePoint 2010 Project - In this post we will see how to deploy Silverlight Application using SharePoint Project in Visual Studio 2010.

Silverlight 4: Using the Busy Indicator - When using Silverlight for enterprise line-of-business application or for any media operations, many-a-times we need to perform external HTTP calls for data access. The HTTP communication is totally dependent on the available bandwidth. Sometimes it happens that the data is too huge and downloading this data takes time. In such cases, the user often has to stare on an empty control in the browser, wondering what’s happening. It is irritating at times and I am sure you must have had a similar experience on some other site. So to make the user comfortable and informed while executing long running operations, we must use a technique that informs the user that something is “happening” behind the scenes. The Silverlight 4 BusyIndicator control provides one such usage in our application.

 

Silverlight 4 and Prism Tutorials

Using Prism with Silverlight 4 - In the article, we will see how to use Prism in Silverlight by creating a sample application.

Prism 4 - Load Modules in Silverlight 4 using Prism - Multiple ways - Module is the most important part of a Prism 4 enabled Silverlight application. It can be registered, loaded in multiple ways, as shown in this article

Loosely Coupled Silverlight 4 applications using Prism 4 and Commanding - In this article, we will how to use DelegateCommand for implementing loosely coupled applications in Silverlight 4 using Prism 4.

Silverlight and Prism: Communication between two Views of the same Module using IEventAggregator - This article shows how to establish communication between two Views of the same Module (intra-module) or two Views of different Modules in Silverlight 4 and Prism 4

Prism 4: Defining Custom Command Behavior for ListBox control in Silverlight 4.0 - In this article, we will see how to define custom command behavior to the List Box control using Silverlight and Prism 4

 

Silverlight 4 and COM Automation Tutorials

Silverlight 4: Creating Word Documents in MyDocuments Folder - In Silverlight 4, using Out-Of-Browser feature with elevated rights and using AutomationFactory, we can easily build application integrating with Word/Excel/Outlook. In the article, I have demonstrated the same.

Access Camera using Silverlight 4.0 and COM - In this post, we will see how to access a Camera using Silverlight 4.0 Out-Of-Browser and COM.

Silverlight 4: Convert Text to Speech - In this post, we will see how to use Silverlight and COM to convert text into speech. We will be using the the ‘SAPI.SpVoice’ API.

Silverlight 4 and COM: Sending Mails Using Outlook - In this post we will see how to access Microsoft Outlook for sending an Email using Silverlight and COM object.

Reading Excel File in Silverlight 4.0 - COM Programming - There have been several new features in Silverlight 4.0 which we have been discussing in the previous articles. One of the Silverlight 4.0 features you should know is COM programming capabilities.

 

Silverlight 5 Beta Tutorials

Silverlight 5 Beta: What’s New? - Silverlight 5 Beta was announced recently by Microsoft. In this article, we will see some of the new features introduced in Silverlight 5 Beta.

Silverlight 5 Beta - WebBrowser Control In Browser to Display HTML - In this post, we will see how to use WebBrowser control to display HTML contents in browser using Silverlight 5 beta. In Silverlight 4, we can use the WebBrowser control only in 'Out-Of-Browser' applications. However In Silverlight 5 Beta, we can now use the WebBrowser control in the Browser (IE).

Silverlight 5 Beta – Unrestricted File Access in Browser - In this post, we will explore Silverlight 5 Beta unrestricted file access within a browser with elevated trust.

Silverlight 5 Beta - Run Elevated Trust Applications in Browser - In this article, we will see how to run an Elevated Trust Application within the Browser using Silverlight 5 Beta. For this demonstration, we will first create a Silverlight application by using Visual Studio 2010 with Silverlight Version 5.

If you liked this article series, also make sure you also read the 50 LINQ Examples, Tips and How To's. Thank you for reading this article!

Give a +1 to this article if you think it was well written. Thanks!
Recommended Articles
Suprotim Agarwal, ASP.NET Architecture MVP, MCSD, MCAD, MCDBA, MCSE, is the CEO of A2Z Knowledge Visuals Pvt. He primarily works as an Architect Consultant and provides consultancy on how to design and develop .NET centric database solutions.

Suprotim is the founder and primary contributor to DotNetCurry, DNC .NET Magazine, SQLServerCurry and DevCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls. and is authoring another one at The Absolutely Awesome jQuery CookBook.

Follow him on twitter @suprotimagarwal


Page copy protected against web site content infringement by Copyscape


User Feedback
Comment posted by waqas on Monday, July 18, 2011 8:53 AM
these are all good tutorials but could you post toturial on prism 4 with Ria services.i did not find any tutorial plz post it as soon as you can and notify me

thanks
Comment posted by waqas on Monday, July 18, 2011 9:42 AM
with prism 4 with Ria services also include authentication system & login with prism4 .thanks
Comment posted by Carol Nadarwalla on Tuesday, July 26, 2011 7:38 PM
Thanks waqas for your feedback. I will pass it to the author.
Comment posted by jagadish on Tuesday, September 17, 2013 9:02 PM
Thank you agarwal for such a nice tutorials, it really helps to learn.

Post your comment
Name:  
E-mail: (Will not be displayed)
Comment:
Insert Cancel