Reputation: 2246
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
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