Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

InputChipGroup.Completed Event

Fires when a user presses Enter in the editor and allows you to create a chip.

Namespace: DevExpress.Maui.Editors

Assembly: DevExpress.Maui.Editors.dll

NuGet Package: DevExpress.Maui.Editors

#Declaration

C#
public event CompletedEventHandler Completed

#Event Data

The Completed event's data class is CompletedEventArgs. The following properties provide information specific to this event:

Property Description
ClearEditorText Gets or sets whether to clear text in the editor after a chip is created.

#Example

The code below shows how to create a chip based on user input.

using Microsoft.Maui.Controls;
using System.Collections.Generic;

public partial class MainPage : ContentPage {
    //...
    private void OnInputChipGroupCompleted(object sender, CompletedEventArgs e) {
        var chipGroup = sender as InputChipGroup;
        if (chipGroup.EditorText.Length <= 3) {
            e.ClearEditorText = false;
        } else {
            IList<ChipDataObject> list = chipGroup.ItemsSource as BindingList<ChipDataObject>;
            list.Add(new ChipDataObject() { Text = chipGroup.EditorText });
        }
    }
}

public class ChipDataObject {
    public string Text { get; set; }
}
See Also