We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Change/Add new RGB values of LabelValue


My question is how I can Change/Add new RGB values of LabelValue?

Thanks in advance


3 Replies

PM Piruthiviraj Malaimelraj Syncfusion Team September 1, 2017 06:39 AM UTC

Hi Raul, 

Thanks for your interest in Syncfusion products, 

We could able to understand your scenario and created the simple sample. In order to change the label colors, use the custom ScheduleDataProvider and override the InitLists method. In that method, you can change the LabelValue colors. Please make use of the below code, 

Code snippet: 
public class SimpleScheduleDataProvider : ScheduleDataProvider 
    /// <summary> 
    /// Default constructor. 
    /// </summary> 
    public SimpleScheduleDataProvider() 
        : base() 
    public override void InitLists() 
        ///Suggestion 1 
        this.LabelList[0].ColorMember = Color.Black; 
        this.LabelList[1].ColorMember = Color.Red; 
        this.LabelList[2].ColorMember = Color.Purple; 
        this.LabelList[3].ColorMember = Color.Yellow; 
        this.LabelList[4].ColorMember = Color.Pink; 
        this.LabelList[5].ColorMember = Color.YellowGreen; 
        this.LabelList[6].ColorMember = Color.Violet; 
        this.LabelList[7].ColorMember = Color.Tomato; 
        this.LabelList[8].ColorMember = Color.SpringGreen; 
        this.LabelList[9].ColorMember = Color.SandyBrown; 
        this.LabelList[10].ColorMember = Color.RosyBrown; 
        ///Suggestion 2 
        //this.LabelList = new ListObjectList(); 
        //this.LabelList.Add(new ListObject(0, "None", Color.White)); 
        //this.LabelList.Add(new ListObject(1, "Important", Color.Red)); 
        //this.LabelList.Add(new ListObject(2, "Business", Color.Purple)); 
        //this.LabelList.Add(new ListObject(3, "Personal", Color.Yellow)); 
        //this.LabelList.Add(new ListObject(4, "Vacation", Color.Pink)); 
        //this.LabelList.Add(new ListObject(5, "Must Attend", Color.YellowGreen)); 
        //this.LabelList.Add(new ListObject(6, "Travel Required", Color.Violet)); 
        //this.LabelList.Add(new ListObject(7, "Needs Preparation", Color.Tomato)); 
        //this.LabelList.Add(new ListObject(8, "Birthday", Color.SpringGreen)); 
        //this.LabelList.Add(new ListObject(9, "Anniversary", Color.SandyBrown)); 
        //this.LabelList.Add(new ListObject(10, "Phone Call", Color.RosyBrown)); 
Sample link: 

Please let us know if you have any other queries, 


RA Raul September 20, 2017 10:32 AM UTC

Thanks for your help. It works fine!!!



AR Arulpriya Ramalingam Syncfusion Team September 21, 2017 04:03 AM UTC

Hi  Raul,    
We are glad to hear that the provided solution was resolved your scenario.   
Please let us know if you have any other queries.    

Live Chat Icon For mobile
Up arrow icon