BorderColor on LinearAxis Shows on Label

4 posts, 0 answers
  1. Laura
    Laura avatar
    11 posts
    Member since:
    Jan 2014

    Posted 27 May 2015 Link to this post

    Hi,

     

    I would like to change the color of the Axis line, but when I set the BorderColor, I get a border around the label that matches the color I am setting for the Axis line.  I don't want a border around the label, I just want to change the color of the line.  How do I do that?  

    This is the code: linearAxis1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(143)))), ((int)(((byte)(142)))));

    Laura

  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 28 May 2015 Link to this post

    Hello Laura,

    Thank you for writing.

    The axis children are inheriting the border color and in this case you must set their border color as well:
    foreach (var item in verticalAxis.Children)
    {
        item.BorderColor = Color.Transparent;
    }

    Please let me know if there is something else I can help you with. 

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Laura
    Laura avatar
    11 posts
    Member since:
    Jan 2014

    Posted 28 May 2015 in reply to Dimitar Link to this post

    Thank you Dimitar!  This worked perfectly, though I did have to change it just slightly to also change the backcolor of the item, then all worked well.

    foreach (var item in verticalAxis.Children)

    {    

    item.BorderColor = Color.Transparent;
    item.BackColor = Color.Transparent;

    }

  5. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 29 May 2015 Link to this post

    Hello Laura,

    I am glad I could be of help. Let us know if you have any other questions.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top