This is a migrated thread and some comments may be shown as answers.

Change Border Color on SegmentedControl

3 Answers 216 Views
SegmentedControl
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 2
Brian asked on 03 Feb 2019, 08:01 PM

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

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 04 Feb 2019, 10:09 AM
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
0
Brian
Top achievements
Rank 2
answered on 04 Feb 2019, 01:26 PM

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

0
Yana
Telerik team
answered on 07 Feb 2019, 11:56 AM
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
Tags
SegmentedControl
Asked by
Brian
Top achievements
Rank 2
Answers by
Yana
Telerik team
Brian
Top achievements
Rank 2
Share this question
or