Silverlight Local Messaging

Karthik Nadig

I was trying to work with passing data between multiple Silverlight components and Windows.Messaging provides the support just to do this. It is as simple as creating instances of LocalMessagingSender and LocalMessagingReceiver and calling a function to send.

In the example below, the mouse position upon MouseMove is sent as a message. Note: I have used fixed global naming for the receiver so if you open multiple copies of this blog ( in other browsers or in the same browser ) you may get an exception, but you can open any number of sender pages.

This is the sender ( click here to open sender in a new page ):


This is the receiver :

Project files: LocalMessaging.zip


Leave a Reply