Archive for '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.

Won the First Prize!

Silverlight 2 ContestAs I created my latest Silverlight 2 game I read about the contest “Write and Win”, organized by Michael Sync and sponsored by SilverlightShow.net and Steven Hong. I decided to write a simple article, describing the whole process of creating my game: what kind of problems I have encountered, how I have solved them, what techniques I have used, etc.

The contest was closed on 25.07.2008 and then the voting began. It has been two days of voting when on 27.07.2008 the contest was finally over! I was very surprised when Michael Sync published the final results – I won the first prize! I am very happy that people liked my article and voted for me! I am a great fan of Silverlight and I like this way of attracting users to try it. (more…)

Filled under News, Silverlight. 2 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.