Data Binding Support
This article shows how to use RadChat in an MVVM scenario by data binding its items' source to a collection of view models.
To data bind the messages list you can use the DataSource
and MessageConverter
properties of the RadChat control.
The MessageConverter
allows you to use an implementation of the IMessageConverter
interface. This is used to convert between the business object models and the RadChat message models. The ConvertItem
method should convert a business object to a message object and the ConvertMessage
should convert a message object to a business object.
The following example shows how to define custom models and use the converter:
Defining the messages view model
Defining the main view model and populating the data source with data
Implementing message converter
Setting up the RadChat control
