# Class ChannelListSource | EchoHub Documentation
Custom list data source for colored channel list rendering. Active channel gets a &gt; indicator, unread channels are bright with a count badge.

# Class ChannelListSource

Namespace
  EchoHub.Client.UI.ListSources

Assembly
  EchoHub.Client.dll

Custom list data source for colored channel list rendering. Active channel gets a > indicator, unread channels are bright with a count badge.

    public class ChannelListSource : IListDataSource, IDisposable

Inheritance
  object
  ChannelListSource

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

### ChannelListSource()

    public ChannelListSource()

## 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

### Dispose()

    public void Dispose()

### 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

### Update(List<string>, Dictionary<string, int>, string, IReadOnlySet<string>?, IReadOnlySet<string>?, IReadOnlySet<string>?, IReadOnlySet<string>?)

    public void Update(List<string> channels, Dictionary<string, int> unread, string activeChannel, IReadOnlySet<string>? protectedChannels = null, IReadOnlySet<string>? mentionChannels = null, IReadOnlySet<string>? privateChannels = null, IReadOnlySet<string>? systemChannels = null)

#### Parameters

`channels` List<string>
`unread` Dictionary<string, int>
`activeChannel` string
`protectedChannels` IReadOnlySet<string>
`mentionChannels` IReadOnlySet<string>
`privateChannels` IReadOnlySet<string>
`systemChannels` IReadOnlySet<string>

## Events

### CollectionChanged

    public event NotifyCollectionChangedEventHandler? CollectionChanged

#### Event Type

NotifyCollectionChangedEventHandler