Selected background color and border radious

Hi Sync team!
I'm searching a way to change the default blue background color when selecting a button, and if there's some way to adding a border radius to the selected button just like the image I share. 



3 Replies 1 reply marked as answer

SP Sakthivel Palaniyappan Syncfusion Team December 18, 2020 08:43 AM UTC

Hi Jorge Valenzuela,

Greetings from Syncfusion.

We have analyzed your query and we can achieve your requirement by using SelectionIndicatorSettings as like below code snippet.

XAML:

 
  <buttons:SfSegmentedControl 
            SelectionTextColor = "Black" 
            HeightRequest="80" FontColor="Black" 
            VisibleSegmentsCount="6"  
            Color="#dfdfdf"  
            BorderColor="#929292" 
            SelectedIndex="1" 
            > 
            <buttons:SfSegmentedControl.SelectionIndicatorSettings> 
                <buttons:SelectionIndicatorSettings CornerRadius="7"  Color="White"/> 
            </buttons:SfSegmentedControl.SelectionIndicatorSettings>

 
            <segmentCollection:List x:TypeArguments="x:String"> 
                <x:String>1</x:String> 
                <x:String>2</x:String> 
                <x:String>3</x:String> 
                <x:String>4</x:String> 
                <x:String>5</x:String> 
                <x:String>6</x:String> 
            </segmentCollection:List> 
        </buttons:SfSegmentedControl> 

Screenshot:



We have created sample based on this and please find the sample from below.

Sample:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/SegmentXamarin-287413618.zip

Please let us know if you have any other queries.

Regards,
Sakthivel P.


Marked as answer

JV Jorge Valenzuela January 8, 2021 12:52 AM UTC

This worked for me!
Thank you very much for your support.


RS Ruba Shanmugam Syncfusion Team January 8, 2021 04:42 AM UTC

Hi Jorge Valenzuela,

Thanks for your update.

We glad to hear that given solution works.

Please let us know if you need any further assistance.

Regards,
Ruba Shanmugam 


Loader.
Up arrow icon