This example creates a custom color editor and overrides the RepositoryItemColorEdit.GetColorDisplayText
method. The example also uses a helper class to convert a color in any format to a known system color.
public class RepositoryItemMyColorEdit : RepositoryItemColorEdit {
// ...
protected override string GetColorDisplayText(Color editValue) {
object color = editValue;
ColorHelper.TryConvertToKnownColor(ref color);
return base.GetColorDisplayText((Color)color);
}
}
- Form1.cs (VB: Form1.vb)
- MyColorEdit.cs (VB: MyColorEdit.vb)
(you will be redirected to DevExpress.com to submit your response)