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

Change individual chip color

Thread ID:





149409 Nov 25,2019 01:42 PM UTC Nov 26,2019 07:04 AM UTC Xamarin.Forms 1
Tags: SfChip
Artur Aksamit
Asked On November 25, 2019 01:42 PM UTC

Is it possible to set some property (ex. background) for individual chips? I need to have different chips colors inside one group.

Hemalatha Marikumar [Syncfusion]
Replied On November 26, 2019 07:04 AM UTC

Hi Artur, 
Greeting from Syncfusion. 
You can achieve your requirement by using the ItemTemplate support for SfChipGroup and BackgroundColor property of SfChip. Please refer the below code. 
Code Snippet [XAML]: 
            <syncfusion:SfChip Text="{Binding Name}" BackgroundColor="{Binding ChipColor}"/> 
Code Snippet [C#]: Model class 
public class Model 
    public string Name { getset; } 
    public Color ChipColor { getset; } 
Code Snippet [C#]: Viewmodel 
public class ViewModel : INotifyPropertyChanged 
    public ObservableCollection<Model> Employees 
        . . . 
    public ViewModel() 
        employees = new ObservableCollection<Model>(); 
        employees.Add(new Model() { Name = "John", ChipColor = Color.Red }); 
        employees.Add(new Model() { Name = "Stephen", ChipColor = Color.Yellow }); 
        employees.Add(new Model() { Name = "Michael", ChipColor = Color.Pink }); 
        employees.Add(new Model() { Name = "Joel", ChipColor = Color.Gray }); 
Please download the prepared sample from below link   
Please let us know if you need any further assistance on this.  
Hemalatha M. 


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