Tutorials



  • 0 comments  /  posted by  Thomas Holloway  on  Jul 07, 2008 (2 months ago)

    Note: This article is submitted by Thomas Holloway for Silverlight Contest: Write and Win.Thanks a lot, Thomas! Hello All, Please drop a comment if you like it.

    Overview
    Alright, so now that we know what a simple messenger looks like with WCF callbacks, what does it take to put one together in Silverlight? For starters, Silverlight does not have the same capabilities as the full WCF framework. WCF callbacks in Silverlight must be done through HTTP Polling and therefore we don’t really have a truly bi-directional environment. Instead, we must manually setup the message asynchronous message architecture with a few special classes in a new System.ServiceModel.PollingDuplex library.



  • 8 comments  /  posted by  Martin Mihaylov  on  Jul 02, 2008 (2 months ago)

    Recently I needed to use a web service in order to get some data for my Silverlight application and I found that using an ASMX web service with Silverlight 2 could be quite easy. Though, for people who have never used such service it could be not that easy. So I decided to make this “step-by-step” tutorial and I hope it could be useful to someone.

  • 0 comments  /  posted by  Wei-Ling Chen  on  Jun 30, 2008 (2 months ago)

    You may be familiar with the DZone network and our series of Refcardz. We are proud to announce that our newest refcard on Silverlight 2 has just been released and we would be honored if you can look through it and give us any review or feedback. Any supportive mention on your website/blog will be greatly appreciated :).

    Please see information below:

    Light up the web! Silverlight is Microsoft’s offering for designing, developing, and delivering rich interactive applications over the internet. These applications can run on all major platforms and in all major browsers.

  • 0 comments  /  posted by  Emil Stoychev  on  Jun 30, 2008 (2 months ago)

    A common scenario in data binding is to format the data displayed in the UI. Almost every time you show a date or a price you need to format it. Silverlight and WPF are using the so called converters to apply custom logic to a binding.

    Using Converters

    Let's make a small example that illustrates the problem. Consider a ListBox filled with client details - name and birthdate.

    Client Details

    Here the ListBox is bound to a custom business object with a field Birthdate of type DateTime - pretty common situation.

  • 5 comments  /  posted by  Emil Stoychev  on  Jun 25, 2008 (2 months ago)

    Are you a fan of Twitter? Personally I'm, but I'm also a fan of Silverlight. Twitter has a couple of Flash and HTML badges (a.k.a widgets) you can get and put on your blog to let your visitors know what you are up to in the moment. However, Twitter does not have a Silverlight widget. What negligence! :) If you are like me and want not a Flash, but a Silverlight widget on your blog go ahead and read on how you can build one by yourself or just copy the text below to use it.

  • 2 comments  /  posted by  Emil Stoychev  on  Jun 24, 2008 (2 months ago)

    I've been playing with some timers and Web Services and I got stuck in a case where the background thread was trying to update the UI. Well, that's never going to happen. To update the UI you should use the UI thread. Let's see how we can call the UI thread from the background thread.

    Consider this situation:

    You have data that needs to be updated every minute. The data is loaded by calling a web service.

    For the update you can use the Timer class. Both the timer and the web service calls are executed asynchronously.

  • 0 comments  /  posted by  Martin Mihaylov  on  Jun 23, 2008 (2 months ago)

    Introduction

    Last week I’ve published the first part of this article about the Shape controls in Silverlight 2. Now it’s time for the second. We will focus on the Polygon, the Polyline and the Path. Although these controls look more complicated than the first three, still the most important thing is to use your imagination.

    Polygon

    To create a Polygon we use the Points property of the control to define the positions of the polygon’s points. Each point has X and Y value separated with spaces.

  • 0 comments  /  posted by  Martin Mihaylov  on  Jun 17, 2008 (2 months ago)

    What’s new?

    Along with the Silverlight 2 Beta 2 a new version of the DeepZoom Composer was also released. After taking a look at it, I thought that it might be useful to make a list with the changes and the new features I found in it.

    • Output format changed to XML file
    • Image tags can now be added in the Compose section
    • Alignment to Grid and guidelines added to the Compose section
    • Export section enhancements (image formats, Silverlight project output)
  • 6 comments  /  posted by  Emil Stoychev  on  Jun 16, 2008 (2 months ago)

    Introduction

    This articles focuses on the process of creating a Custom Control in Silverlight 2. It describes the basics of what you need to build a styleable control with custom logic that can be used in Silverlight applications. The article shows a sample(part) of implementing a LinkLabel control that recognizes URIs in a given text and displays them as links instead of as plain text.

    Overview

    The control model in Silverlight 2 offers creating UserControls and Custom Controls. UserControls enable encapsulation of a specific logic. They are used in scenarios where you want to reuse XAML and/or logic in multiple places or build a sophisticated page with smaller chunks(the UserControls). However, in other scenarios you may need a custom logic to be built in the control and this control to allow designers customize easily its look. You need a way to modify the control visuals without having to modify the control logic. This is where the Custom Controls comes in handy. In Silverlight they derive from the Control class and specify a default style for the way they will look like.

  • 1 comments  /  posted by  Ivan Dragoev  on  Jun 13, 2008 (2 months ago)

    Introduction

     

    In the first article I showed you how to animate ListBox items in Silverlight 2 Beta 1. Then, to make all the animation the way I wanted, I used some code and hardcoded names of the Storyboards for each state. Now with Silverlight 2 Beta 2 and the cool new VisualStateManager the task for adding animation and other effects for each state becomes easier. Other than that  – now we can add animations even for the transitions from one state to another.

     

    In this article I’ll make the same animations like in the previous one but this time using VisualStateManager and styles.