WCF, Silverlight – Access WCF REST services with Silverlight

Windows Communication Foundation (WCF), part of the .NET Framework, provides the first unified programming model for rapidly building service-oriented applications. It enables the development of secure, reliable, transacted services that interoperate with current Microsoft investments and non-Microsoft platforms.

With the .NET Framework 3.5 release, WCF added support for building REST style services. REST, an architectural style for building distributed hypermedia driven applications, involves building resource-oriented services by defining resources that implement uniform interfaces using standard HTTP verbs (GET, POST, PUT, and DELETE), and that can be located/identified by a URI.

Continue reading WCF, Silverlight – Access WCF REST services with Silverlight

Silverlight, WPF – ListBox Drag and Drop

During my development I need to implement the drag and drop feature in Silverlight. It’s pretty easy to make this feature work in Windows Form but it’s not simple to enable this feature on control in Silverlight. Therefore the developer team of Silverlight has developed a Silverlight toolkit to help us to alleviate our work. The Silverlight Toolkit is a collection of Silverlight controls, components and utilities made available outside the normal Silverlight release cycle. For more details about this toolkit you can read here http://silverlight.codeplex.com/.
In this example I would like to illustrate how we can use this toolkit to adapt the drag and drop to list box component of Silverlight. First you need to browse to URL above and install Silverlight Toolkit, then use Microsoft Expression Blend to add two list boxes to our application

Continue reading Silverlight, WPF – ListBox Drag and Drop

Silverlight – Routed Event

The routed event was first introduced in WPF. It allows us to handle the event through a tree of elements in WPF application. The routed event can be understood as functional or implementation definition.
– Functional definition: A routed event is a type of event that can invoke handlers on multiple listeners in an element tree, rather than just on the object that raised the event.
– Implementation definition: A routed event is a CLR event that is backed by an instance of the RoutedEvent class and is processed by the Windows Presentation Foundation (WPF) event system.
A typical WPF application contains many elements. Whether created in code or declared in XAML, these elements exist in an element tree relationship to each other. The event route can travel in one of two directions depending on the event definition.

Continue reading Silverlight – Routed Event

My silverlight applications

As you can see, there are two changes at my site in last days. I added a new page called “My Silverlight” and add a new banner of Bluehost. I am learning now Silverlight so I would like to publish my applications too. My applications are not so complicated applications. They are just simple and operate simple calculations but they help me a lot when starting to learn Silverlight.
At the beginning I thought of some applications working with database so that I can review knowledge working with database and play around with LINQ. But after some first efforts to access databases on my host I found that it is not easy to do that. I must implement a Web service to allow the Silverlight accessing database. I do not know how to implement Web service with PHP and Bluehost does not support ASP and .Net. And another problem is that it is pretty easy to decompile a Silverlight application and therefore I can not protect my Web service link. I am now thinking of finding a free host which supporting a .net web service and start my projects again. The list of my Silverlight applications can be found at My Silverlight page. I hope that they can help you.
The second news is the banner of Bluehost. Bluehost is a host provider. I am using it too. I find that Bluehost is very good host provider so I would like to be their affiliate and place their banners in my blog so that I can advertise Bluehost to anyone else.  If someone clicks on the banner and buys one host at Bluehost, I will get a small amount of money. This amount of money I will use to renew my host because each month I must pay $6.95 for maintaining my host. Although I have placed some ads of Google Adsense but my income at this Pay-Per-Click program is pretty low. So I add one banner of Bluehost with hoping that the income through advertisement will increase and I do not have to take care of finance for maintaining my host anymore and as the consequence I have more time to make valuable research. I hope that you sympathize and the ads at my site will not disturb you so much.

Silverlight – Sending data between Silverlight applications with LocalMessage API

In Silverlight 3, Microsoft allows us to sending data between local Silverlight-based applications through defined channel. To use this feature we’ll apply the classes in namespace System.Windows.Messaging. In next example I would like to illustrate how we can build this local channel.

Continue reading Silverlight – Sending data between Silverlight applications with LocalMessage API