Tag Archives: Silverlight

Timer vs. DispatcherTimer in WPF

Have you ever wondered what is the difference between Timer and DispatcherTimer in WPF / Silverlight? In this post I will try to explain you the little difference. Timer generates recurring events in an application. DispatcherTimer is a timer that is integrated into the Dispatcher queue which is processed at a specified interval of time and at a specified priority. Timers are not guaranteed to execute exactly when the time interval occurs, but are guaranteed not to execute before the time interval occurs. This is because DispatcherTimer operations are placed on the Dispatcher queue like other operations. When the DispatcherTimer operation executes, it is dependent of the other jobs in the queue and their priorities. (more…)

Filled under Silverlight, WPF. 5 Comments.

Silverlight & PHP

Silverlight 2 Beta 2 enables significantly improved interop with SOAP based web-services. Web service proxy class end-point URLs can now be configured without recompiling applications. Visual Studio also now has a new “Silverlight-enabled WCF Service” project item template that you can add to ASP.NET web projects to publish services to clients.

It is uncommon to use Silverlight in conjunction with PHP, but sometimes you may need this. In this post I will show you how easy it can be using Silverlight SOAP based web-services support. Actually it is really very simple. All we need is a PHP web service. Than we just add a Service reference to our Silverlight app, and voila.

There are a few ways to create a PHP SOAP web service. In this example I will use NuSOAP library. The NuSOAP project is hosted by SourceForge. NuSOAP is a group of PHP classes that allow developers to create and consume SOAP web services. It does not require any special PHP extensions. The current release version (0.7.3) of NuSOAP supports SOAP 1.1 specification. It can generate WSDL 1.1 and also consume it for use in serialization. Both rpc/encoded and document/literal services are supported. (more…)

Filled under Silverlight. 31 Comments.

Creating a Silverlight game

I am a great fan of Silverlight. I have never liked 1.0, but when version 2.0 was released I was amazed. I created a few solitaire games. Now I decided to create a new game and to describe the problems I have encountered to you. First I decided to write an article about creating a Silverlight application for Facebook. But subsequently I decided to divide the article in two parts – creating a Silverlight application, which is a game in this occasion, and integrating it in Facebook.

I am going to create a game, called Cows & Bulls. You play that game for time. It supports a list of all players and their time. (more…)

Filled under Silverlight. 1 Comment.

Drag & Drop in Silverlight 2

In some occasions you will need to drag & drop items between different objects in your Silverlight application. Although in Windows Forms is very easy to achieve this goal (because you have the events DragEnter, DragDrop), in Silverlight you can do the same with little tricks. In this example I will show you how to do drag & drop over a canvas.

We are going to create a project, called Freedom in the Sky. We have a custom control, called Bird, which we want to drag & drop over a canvas. Here is our custom control.

(more…)

Filled under Silverlight. 2 Comments.

Silverlight 2 Beta 2

Beta 2 is coming this week! Pete Brown wrote a short overview of what will this beta contain. Here it is.

  • Cross-domain changes to Sockets
  • WCF Duplex Communications
  • TextWrapping in textbox
  • TabControl
  • Updates to Improve WPF Compatibility

Along with Silverlight 2 Beta 2, you’ll find a new preview of Expression Blend 2.5 and a new version of Deep Zoom Composer.

Filled under News, Silverlight. No Comments.