/How-to-create-action-typed-chip-in-Xamarin.Forms

An explanation of the purpose of the sample, which is to illustrate the process of creating action-typed chips in a Xamarin.Forms application.

Primary LanguageC#

How-to-create-a-Chips-sample

This repository sample explains how to create a chips sample in Xamarin.Forms

Getting Started with Chip sample

Step 1: Add the NuGet to the project and add the namespace as shown in the following code sample:

[XAML]

xmlns:buttons="clr-namespace:Syncfusion.XForms.Buttons;assembly=Syncfusion.Buttons.XForms"

[C#]

using Syncfusion.XForms.Buttons;

Step 2: Then initialize an empty SfChipGroup as shown in the following code:

[XAML]

<ContentPage.Content>
  <Grid>
     <buttons:SfChipGroup/>
  </Grid>
</ContentPage.Content>

[C#]

public GettingStarted()
{
  InitializeComponent();
  Grid grid = new Grid();
  grid.Children.Add(new SfChipGroup());
  this.Content = grid;
}

How-to-create-action-typed-chip-in-Xamarin.Forms

Action type of SfChipGroup, executes the Command when clicking the chip in SfChipGroup. On its Command action, we can do our desired action.

Command will execute only for Action typed SfChipGroup.