RadLinearGauge set color of bar

4 posts, 0 answers
  1. Jasper
    Jasper avatar
    12 posts
    Member since:
    Jul 2014

    Posted 26 Aug 2018 Link to this post

    I am trying to set the color of the bar , when a value goes below a certain amount. I have tried the below, but none of them change the color of the bar from Green to red. :

          barBat.BackColor = Color.Yellow
                            barBat.GaugeElement.BackColor = Color.Yellow
                            barBat.GaugeElement.BackColor2 = Color.Yellow
                            barBat.GaugeElement.BackColor3 = Color.Yellow
                            barBat.GaugeElement.BackColor4 = Color.Yellow

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3636 posts

    Posted 29 Aug 2018 Link to this post

    Hello, Jasper,          
     
    In order to change the color of the LinearGaugeBar, you should set the BackColor and BackColor2 properties of the respective LinearGaugeBar

    Me.LinearGaugeBar1.BackColor = Color.Aqua
    Me.LinearGaugeBar1.BackColor2 = Color.Aqua


    I hope this information helps. If you have any additional questions, please let me know.  
     
    Regards,
    Dess
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Jasper
    Jasper avatar
    12 posts
    Member since:
    Jul 2014

    Posted 02 Sep 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    I do get a compile error:

    'BackColor2' is not a member of 'RadLinearGauge'.

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3636 posts

    Posted 03 Sep 2018 Link to this post

    Hello, Jasper,         

    The BackColor2 property is relevant for the LinearGaugeBar as it is demonstrated in the code snippet from my previous post. I have attached my sample project for your reference.

    I hope this information helps.

    Regards,
    Dess
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top