views:

198

answers:

1

Hey guys, I've got what I think is an interesting question:

You all know and love the Skype chat interface: each message is enclosed in a bubble, with emoticons and link capabilities, as well as an avatar at the left.

What is the most ideal WPF component to house each message in, if I were creating a Skype-like interface?

I am using MVVM, so all my messages are stored in the ViewModel as an ObservableCollection.

I have had problems binding to a RichTextBox, and so I have investigated binding to a Listbox, where each list item is a message and each item is styled to have a Skypey border and avatar etc.

Any ideas?

A: 

The only suitable solution that I have found is using the flowdocumentreader and an ivalueconverter to convert an array of strings to a flowdocument. It actually works great once I made my own scripting language similar to bbcode.

This was the sample I learned from. http://michaelsync.net/2009/06/09/bindable-wpf-richtext-editor-with-xamlhtml-convertor

It was a little overkill for me so I ended up just making the ivalueconverter and a simple script language.