Kelly Cline
Kelly Cline

Reputation: 2246

DevExpress Silverlight Chart CustomPalette

When I instantiate a DevExpress.Xpf.Charts.CustomPalette, I cannot find how to set my own Colors in code. The constructor takes no parameters, and the Colors property is Read-Only.

Upvotes: 0

Views: 251

Answers (1)

DmitryG
DmitryG

Reputation: 17850

There is no magic. The Colors property is a colection (System.Collections.ObjectModel.ObservableCollection<System.Windows.Media.Color>). Thus you should add your colors into this colection:

CustomPalette palette = new CustomPalette();
//...
palette.Colors.Add(Colors.Green);
//...

Upvotes: 2

Related Questions