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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Styling SegmentControl

Thread ID:





146418 Aug 2,2019 03:35 PM UTC Aug 5,2019 07:26 AM UTC Xamarin.Forms 1
Tags: SfDataForm
Asked On August 2, 2019 03:35 PM UTC


I want to style to segment control that gets rendered in a SfDataForm. 

How do I style SelectionIndicatorSettings and other aspects?

Subburaj Pandian Veluchamy [Syncfusion]
Replied On August 5, 2019 07:26 AM UTC

Hi Mario, 
Thank you for contacting Syncfusion support. 
We have analyzed your requirement “Customize Segment editor styles in DataForm”. Segment editor styles can be customized using custom DataForm editor. In custom segment editor you can change SelectionIndicatorSettings for the view.  
Kindly refer our UG documentation to know more about customizing DataForm editor, 
Code Snippet: 
 public class SegmentEditorExt : DataFormSegmentedEditor 
     public SegmentEditorExt(SfDataForm dataForm) : base(dataForm) 
     protected override void OnInitializeView(DataFormItem dataFormItem, SfSegmentedControl view) 
        base.OnInitializeView(dataFormItem, view); 
        SelectionIndicatorSettings selectionIndicator = new SelectionIndicatorSettings(); 
        selectionIndicator.Color = Color.Red; 
        view.SelectionIndicatorSettings = selectionIndicator; 
dataForm.RegisterEditor("Segment"new SegmentEditorExt(dataForm)); 
We have prepared a simple sample for the same, 
Sample link: DataForm 
We hope this helps. Kindly revert us if you have any concern. 
Subburaj Pandian V 


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