We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfSegmentedControl.SelectionIndicatorSettings Color has no effect.

Thread ID:

Created:

Updated:

Platform:

Replies:

148444 Oct 19,2019 07:10 PM UTC Nov 3,2019 08:01 AM UTC Xamarin.Forms 4
loading
Tags: SfSegmentedControl
K Carter
Asked On October 19, 2019 07:10 PM UTC

I using the latest release version of SfSegmentedControl and the selection color is always blue no matter the color set.

              <sfButtons:SfSegmentedControl.SelectionIndicatorSettings>
                <sfButtons:SelectionIndicatorSettings Color="Black" CornerRadius="20"/>
              </sfButtons:SfSegmentedControl.SelectionIndicatorSettings>

Hemalatha Marikumar [Syncfusion]
Replied On October 21, 2019 09:22 AM UTC

Hi K Carter, 
 
Greetings from Syncfusion. 
 
We would like to let you know that we were unable to reproduce the reported issue “Provided color for SelectionIndicatorSettings’s Color property is not applied” with the provided code snippet. Please download the tested sample in below 
  
 
Here provided Color value has been applied properly to the Selection indicator of SegmentedControl. Please check with the sample and let us know if the reported issue persists, update us with the following details to check it further and provide a better solution 
 
  • Modified sample of attached sample with replication procedure or
  • Please share the entire code snippet
  • Are you facing this issue only with latest version of SegmentedControl or else in previous version
 
 Regards, 
Hemalatha M. 


K Carter
Replied On October 21, 2019 05:40 PM UTC

Thank you for responding. Looking at your code, I've found the issue causing the problem.

It looks like the problem is caused by the theme being applied "AFTER" the SelectionIndicatorSettings
is being applied.

The SelectionIndicatorSettings are being applied before the theme settings even though the
SelectionIndicatorSettings come "LATER" in the xaml.

         <syncfusionTheme:SyncfusionThemeDictionary>
           <syncfusionTheme:SyncfusionThemeDictionary.MergedDictionaries>
             <syncfusionTheme:LightTheme xaml:Name="LightTheme"/>
           </syncfusionTheme:SyncfusionThemeDictionary.MergedDictionaries>
         </syncfusionTheme:SyncfusionThemeDictionary>


Hemalatha Marikumar [Syncfusion]
Replied On October 24, 2019 02:07 PM UTC

Hi K Carter, 
  
We have confirmed “SelectionIndicatorSettings Color property does not work when we use themes” as a bug and logged a defect report. The fix for this issue will be available as a patch on 1st November 2019. 
  
  
If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal link above. 
  
Until you can resolve this issue by setting SyncPrimaryColor in the ResourceDictionary to set Background color of the selectionstrip. Please refer the below code. 
  
Code snippet[XAML]: 
<ContentPage.Resources> 
    <syncfusionTheme:SyncfusionThemeDictionary> 
        <syncfusionTheme:SyncfusionThemeDictionary.MergedDictionaries> 
            <syncfusionTheme:LightTheme /> 
            <ResourceDictionary> 
                <Color x:Key="SyncPrimaryColor">Green</Color> 
            </ResourceDictionary> 
        </syncfusionTheme:SyncfusionThemeDictionary.MergedDictionaries> 
    </syncfusionTheme:SyncfusionThemeDictionary> 
</ContentPage.Resources> 
 
  
  
Please refer the below link to know the theme setting keys for SfSegmentedControl, 
  
Note - Please update the currently using nuget version of yours to provide a patch for this issue. We only provide patch for Main release and SP release version. We don’t have support to provide patch for weekly nugets and Beta release versions. 
  
Regards, 
Hemalatha M. 


Geetha Rajendran [Syncfusion]
Replied On November 3, 2019 08:01 AM UTC

Hi K Carter, 
  
Sorry for the inconvenience caused. We have used dynamic resource for themes support in our control. By default, direct property values are not working for nested classes if we set dynamic resource. Since the value set for Color property overridden by dynamic resource value. But we can resolve this issue by setting value for dynamic resource key in control resource as per below code snippet. 
  
<buttons:SfSegmentedControl SelectionTextColor="Yellow" FontColor="Red" Color="Pink"
                                    VisibleSegmentsCount="4" SegmentCornerRadius="20" CornerRadius="20">
 
  
            <buttons:SfSegmentedControl.Resources>
                <Color x:Key="SyncPrimaryColor">Black</Color>
            </buttons:SfSegmentedControl.Resources>
 
  
            <buttons:SfSegmentedControl.SelectionIndicatorSettings>
                <buttons:SelectionIndicatorSettings CornerRadius="20" />
            </buttons:SfSegmentedControl.SelectionIndicatorSettings>
 
  
</buttons:SfSegmentedControl> 
 
  
Thanks, 
Geetha R. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon