attach SfSegmentedControl.SelectionIndicatorSettings to a style

Hi does anyone know how to set the SfSegmentedControl.SelectionIndicatorSettings.Color in a style.
See attached file for code
regards

Attachment: SfSegmentedControl_e8e3e809.zip

3 Replies

SP Sakthivel Palaniyappan Syncfusion Team December 15, 2020 01:34 PM UTC

Hi stuff,

Greetings from Syncfusion.

We have analyzed the query and prepared a workaround sample for this. We have achieved your requirement as like below code snippet.

XAML:

 
<ContentPage.Resources> 
        <ResourceDictionary> 
            <Style x:Key="segmented_button" TargetType="buttons:SfSegmentedControl"> 
                <Setter Property="FontSize" Value="10" /> 
                <Setter Property="SegmentBorderThickness" Value="3" /> 
                <Setter Property="DisplayMode" Value="Text" /> 
                <Setter Property="SelectionIndicatorSettings"> 
                    <buttons:SelectionIndicatorSettings Color="Pink" /> 
                </Setter> 
            </Style> 
        </ResourceDictionary> 
    </ContentPage.Resources> 
 
    <StackLayout VerticalOptions="CenterAndExpand"> 
        <buttons:SfSegmentedControl x:Name="buttons" 
                                                                                                    Style="{StaticResource segmented_button}"> 
            <lists:List x:TypeArguments="x:String"> 
                <x:String>CREATE TASK</x:String> 
                <x:String>DELETE TASK</x:String> 
            </lists:List> 
        </buttons:SfSegmentedControl> 
    </StackLayout> 

Please have the sample from the following link,

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

Please let us know if you have any concerns.

Regards,
Sakthivel P.
 



SS Swetha Srikumar Syncfusion Team December 22, 2020 09:24 AM UTC


Sent: Tuesday, December 22, 2020 4:07 AM
To: Syncfusion Support <[email protected]>
Subject: RE: Syncfusion support community forum 160498, attach SfSegmentedControl.SelectionIndicatorSettings to a style, has been updated. 
Thanks Team, 
Appreciate the support. 
 



SP Sakthivel Palaniyappan Syncfusion Team December 24, 2020 09:00 AM UTC

Hi Stuff,

Thanks for the update.

Please let us now if you need further assistance on this.

Regards,
Sakthivel P.
 


Loader.
Up arrow icon