# Class ChatListSource | EchoHub Documentation
Custom list data source for chat messages with per-character coloring.

# Class ChatListSource

Namespace
  EchoHub.Client.UI

Assembly
  EchoHub.Client.dll

Custom list data source for chat messages with per-character coloring.

    public class ChatListSource : IListDataSource, IDisposable

Inheritance
  object
  ChatListSource

Implements
  IListDataSource
  IDisposable

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## Constructors

### ChatListSource()

    public ChatListSource()

## Properties

### Count

    public int Count { get; }

#### Property Value

int

### MaxItemLength

    public int MaxItemLength { get; }

#### Property Value

int

### SuspendCollectionChangedEvent

    public bool SuspendCollectionChangedEvent { get; set; }

#### Property Value

bool

## Methods

### Add(ChatLine)

    public void Add(ChatLine line)

#### Parameters

`line` ChatLine

### AddRange(IEnumerable<ChatLine>)

    public void AddRange(IEnumerable<ChatLine> lines)

#### Parameters

`lines` IEnumerable<ChatLine>

### Clear()

    public void Clear()

### Dispose()

    public void Dispose()

### InsertRange(int, IEnumerable<ChatLine>)

    public void InsertRange(int index, IEnumerable<ChatLine> lines)

#### Parameters

`index` int
`lines` IEnumerable<ChatLine>

### IsMarked(int)

    public bool IsMarked(int item)

#### Parameters

`item` int

#### Returns

bool

### Render(ListView, bool, int, int, int, int, int)

    public void Render(ListView listView, bool selected, int item, int col, int row, int width, int viewportX = 0)

#### Parameters

`listView` ListView
`selected` bool
`item` int
`col` int
`row` int
`width` int
`viewportX` int

### SetMark(int, bool)

    public void SetMark(int item, bool value)

#### Parameters

`item` int
`value` bool

### ToList()

    public IList ToList()

#### Returns

IList

## Events

### CollectionChanged

    public event NotifyCollectionChangedEventHandler? CollectionChanged

#### Event Type

NotifyCollectionChangedEventHandler