Monday, September 17, 2012

Notification for multiple clients in Silverlight

Notification for multiple clients in Silverlight

I am implementing something like simple chat on silverlight. On my view I have button "Send" with textbox and list of the messages that bind to the viewmodel property.

When user presses "Send" the message adds to the database and then messages list (observable collection) refreshes. After that I raise PropertyChanged event from INotifyPropertyChanged interface. This works well and new message is added to list immediately.

But what I want to do is to refresh all views what is now opened. How can this be achieved?

Thanks and sorry for bad english.

Answers & Comments...

Answer: 1

One way is to build a Duplex Service. How to: Build a Duplex Service for a Silverlight Client The Duplex service will "push" updates from a WCF service to all clients that are subscribed to it.

Radenko Zec provides references and source code that I've used in a similar project to provide a notification service for Silverlight clients.

by : ArchilectOnehttp://stackoverflow.com/users/697308




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog