Change Border Color on SegmentedControl

4 posts, 0 answers
  1. Brian
    Brian avatar
    12 posts
    Member since:
    Apr 2018

    Posted 03 Feb Link to this post

    Hi, Can you tell me how to change the color on a SegmentedControl please? Attached is my implementation and you can see the white border lines.  I'd like control of the color so I can have it blend in better.

     

    Thank you,
    Brian

  2. Yana
    Admin
    Yana avatar
    4897 posts

    Posted 04 Feb Link to this post

    Hello Brian,

    Thank you for providing the screenshot.

    Border color is defined by SelectedSegmentBackgroundColor property of the control  by design.  I am afraid there isn't a way to set the border for different segments. We have a feature request logged for exposing more styling options for the segments, you could comment and cast your vote at the link below:
    https://feedback.telerik.com/xamarin/1366194-segmentedcontrol-expose-additional-properties-or-mechanism-to-control-the-appearance-of-the-items

    You can consider using a RadTabView control instead as it provides more ways to customize the HeaderItems by setting custom control templates. You can find more information on the following article from our documentation page  - TabViewHeaderItem. Furthermore, you can have a look at the examples in the SDK Samples Application(located in the Examples folder of your local Telerik UI for Xamarin installation) or in the QSF Application(located in the QSF folder of your local installation).

    Let me know if you have any additional questions.

    Regards,
    Yana
    Progress 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. Brian
    Brian avatar
    12 posts
    Member since:
    Apr 2018

    Posted 04 Feb in reply to Yana Link to this post

    Hi Yana, I got it working but I have one more question.  Can I change the font attributes if I use a custom renderer?  I can't go to radTabView for other issues with Tab and now I've SegmentedControl so close. :) .   I will update the feat request above and explain that I still would like header attributes style-able. 

    Thanks again, 

    B

  4. Yana
    Admin
    Yana avatar
    4897 posts

    Posted 07 Feb Link to this post

    Hi Brian,

    I am afraid that would not be an easy task, especially on Android.  I have tested creating a custom renderers on Android and iOS platforms, you can find my sample project attached.
    On Android we're wrapping a native RadSegmentedView control which basically is Android RadioGroup.  You could explore the available options and try to find a way to set its font attributes.

    I hope this would be helpful.

    Regards,
    Yana
    Progress 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