ColorPaletteSample.Colors = new ObservableCollection<ColorPaletteItem2> { new ColorPaletteItem2{ Color = Colors.Red, ColorName = "Red" }, new ColorPaletteItem2{ Color = Colors.Yellow, ColorName = "Yellow" }, new ColorPaletteItem2{ Color = Colors.Orange, ColorName = "Orange" }, };
You must set ColorSet to Custom, and then add your ColorPaletteItem instances to the Colors collection — not ItemsSource or Items.
Customize ItemShape
The ColorPalette control accepts ColorPaletteItem elements. So, if you want to customize the item shape, you can override the ColorPaletteItem style and set its ItemShape property to Custom. This ensures that the control won’t overwrite your custom ControlTemplate.
ItemsPanel
currently we are using a WrapPanel, but if you want, you can customize ItemsPanel: