I'm building a chat application using WPF and I'm trying to understand which is the best approach for realizing it.
I have a "receive" event in my ViewModel and, when a message arrives, I think to add it to an ObservableCollection<Message>
that contains all the messages sent and arrived in chat session.
I should have to open a new chat window when a message arrives from a new user and I have to add the message if it arrives from a user for which the window has already been created.
Is it a good thing to have a unique ObservableCollection for all the messages? If so, how can I inform the view that a message has arrived for a new user? And how can I put a "filter" to the collection for databinding messages for users?