You can use the available APIs (LocalMessageSender/LocalMessageReceiver)
Reference: http://elegantcode.com/2010/05/01/communicating-between-silverlight-applications/
The Receiver
This event is fired when a message is successfully received from a sender. The sent message is available in the Message property. The next required step is to call the Listen method on the receiver. The receiver will continue receiving messages until you call its Dispose method.
LocalMessageReceiver messageReceiver = newLocalMessageReceiver(Constants.ReceiverName); |
After a message is received you can send a response back to the sender by setting the Response property in the MessageReceived event handler.
messageReceiver.MessageReceived += (object sender,MessageReceivedEventArgs e) => |
The Sender
When you create the sender you must specify the receiver that will be listening for the messages. To send a message, the sending application calls the SendAsync method, passing in a String message with a maximum size of 40 kilobytes.
LocalMessageSender sender = newLocalMessageSender(Constants.ReceiverName); |
Any response from the receiver can be handled in the SendCompleted event.
sender.SendCompleted += (o, e) => |
No comments:
Post a Comment