简体   繁体   English

向同步添加颜色ColorpickerPalette控件

[英]Add Color to syncfusion ColorpickerPalette control

i will add color to standard color list in syncfusion ColorPickerPalette control. 我将在同步融合ColorPickerPalette控件中将颜色添加到标准颜色列表中。 i write code: 我写代码:

 ColorPickerPalette  Palette=new ColorPickerPalette();
    Palette.stdColorCollection=new ObservableCollection<ColorGroupItem>();
    ColorGroupItem ColorItem=new ColorGroupItem();
    ColorItem.HeaderName="No Color";
    ColorItem.Color=Brushes.Transparent;
    Palette.stdColorCollection.Add(ColorItem);

But this color dont show in Palette. 但是此颜色不会显示在调色板中。

Try if a theme is getting applied: 尝试是否应用主题:

Palette.Themes = PaletteTheme.Apex;

if it doesnt work, check if you have properly added the palette to the parent control: 如果不起作用,请检查是否已正确将调色板添加到父控件:

LayoutRoot.Children.Add(colorpicker);

Let me know if it works. 让我知道它是否有效。 Otherwise we'll think of other things. 否则,我们会考虑其他事情。 :) :)

CHEERS !!! 干杯!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM