menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfChip - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfChip

    Represents a Chip control which can be added in a layout and grouped using SfChipGroup. Represents the SfChip class.

    Inheritance
    System.Object
    SfView
    ButtonBase
    SfChip
    Implements
    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<Microsoft.Maui.IView>
    System.Collections.Generic.ICollection<Microsoft.Maui.IView>
    System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Inherited Members
    ButtonBase.Background
    ButtonBase.BackgroundImageSource
    ButtonBase.BackgroundImageSourceProperty
    ButtonBase.BackgroundProperty
    ButtonBase.Clicked
    ButtonBase.Command
    ButtonBase.CommandParameter
    ButtonBase.CommandParameterProperty
    ButtonBase.CommandProperty
    ButtonBase.CornerRadius
    ButtonBase.CornerRadiusProperty
    ButtonBase.DrawOutline(ICanvas, RectF)
    ButtonBase.EnableRippleEffect
    ButtonBase.EnableRippleEffectProperty
    ButtonBase.Finalize()
    ButtonBase.FontAttributes
    ButtonBase.FontAttributesProperty
    ButtonBase.FontAutoScalingEnabled
    ButtonBase.FontAutoScalingEnabledProperty
    ButtonBase.FontFamily
    ButtonBase.FontFamilyProperty
    ButtonBase.FontSize
    ButtonBase.FontSizeProperty
    ButtonBase.HorizontalTextAlignment
    ButtonBase.HorizontalTextAlignmentProperty
    ButtonBase.ImageAlignment
    ButtonBase.ImageAlignmentProperty
    ButtonBase.ImageSize
    ButtonBase.ImageSizeProperty
    ButtonBase.ImageSource
    ButtonBase.ImageSourceProperty
    ButtonBase.OnHandlerChanged()
    ButtonBase.Padding
    ButtonBase.PaddingProperty
    ButtonBase.ShowIcon
    ButtonBase.ShowIconProperty
    ButtonBase.Stroke
    ButtonBase.StrokeProperty
    ButtonBase.StrokeThickness
    ButtonBase.StrokeThicknessProperty
    ButtonBase.Text
    ButtonBase.TextColor
    ButtonBase.TextColorProperty
    ButtonBase.TextProperty
    ButtonBase.VerticalTextAlignment
    ButtonBase.VerticalTextAlignmentProperty
    SfView.ArrangeOverride(Rect)
    SfView.Children
    SfView.ClipToBounds
    SfView.GetSemanticsNodesCore(Double, Double)
    SfView.IDrawableLayout.DrawingOrder
    SfView.IDrawableLayout.InvalidateDrawable()
    SfView.MeasureOverride(Double, Double)
    SfView.OnBindingContextChanged()
    Namespace: Syncfusion.Maui.Core
    Assembly: Syncfusion.Maui.Core.dll
    Syntax
    public class SfChip : ButtonBase, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, ITouchListener, ITextElement, ITapGestureListener, IGestureListener, IParentThemeElement, IThemeElement

    Constructors

    SfChip()

    Initializes a new instance of the SfChip class.

    Declaration
    public SfChip()

    Fields

    CloseButtonColorProperty

    Gets or sets the value of CloseButtonColor. This property can be used to change the color of the close button. This is a bindable property.

    Declaration
    public static readonly BindableProperty CloseButtonColorProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CloseButtonPathProperty

    Gets or sets the value of CloseButtonPath. This property can be used to change the path of the close button. This is a bindable property.

    Declaration
    public static readonly BindableProperty CloseButtonPathProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SelectionIndicatorColorProperty

    Identifies the SelectionIndicatorColor property. This property can be used to set color to the selection indicator.

    Declaration
    public static readonly BindableProperty SelectionIndicatorColorProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    ShowCloseButtonProperty

    Identifies the ShowCloseButton property. This property can be used to set close button by setting this property to true.This is Bindable Property.

    Declaration
    public static readonly BindableProperty ShowCloseButtonProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowSelectionIndicatorProperty

    Identifies the ShowSelectionIndicator property. This property can be used to set whether the selection indicator is visible or not.

    Declaration
    public static readonly BindableProperty ShowSelectionIndicatorProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This Microsoft.Maui.Controls.BindableProperty is read-only.

    Properties

    CloseButtonColor

    Gets or sets the value of CloseButtonColor. This property can be used to change the color of the close button.

    Declaration
    public Color CloseButtonColor { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Graphics.Color

    Specifies the close button color.The default value is Color.FromArgb("#49454E").

    CloseButtonPath

    Gets or sets the value of CloseButtonPath. This property can be used to customize the close button.

    Declaration
    public string CloseButtonPath { get; set; }
    Property Value
    Type Description
    System.String

    Specifies the close button path.The default value is string.Empty.

    IsSelected

    Gets a value indicating whether the SfChip is selected.

    Declaration
    public bool IsSelected { get; }
    Property Value
    Type
    System.Boolean

    SelectionIndicatorColor

    Gets or sets the value of SelectionIndicatorColor. This property can be used to change the color of the selection Indicator.

    Declaration
    public Color SelectionIndicatorColor { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Graphics.Color

    Specifies the selection indicator color.The default value is Color.FromRgb(30, 25, 43).

    ShowCloseButton

    Gets or sets a value indicating whether the close button is visible or not .The close button is in visible state when this property is set to true.

    Declaration
    public bool ShowCloseButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    Specifies the show close button property.The default value is false.

    ShowSelectionIndicator

    Gets or sets a value indicating whether the selection indicator is visible or not .The selection indicator is in visible state when this property is set to true.

    Declaration
    public bool ShowSelectionIndicator { get; set; }
    Property Value
    Type Description
    System.Boolean

    Specifies the show selection indicator.The default value is false.

    Methods

    ArrangeContent(Rect)

    Arrange content method.

    Declaration
    protected override Size ArrangeContent(Rect bounds)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.Rect bounds
    Returns
    Type Description
    Microsoft.Maui.Graphics.Size

    the size.

    Overrides
    SfView.ArrangeContent(Rect)

    ChangeVisualState()

    To change the visual state of the chip control.

    Declaration
    protected override void ChangeVisualState()
    Overrides
    ButtonBase.ChangeVisualState()

    MeasureContent(Double, Double)

    Measure content method.

    Declaration
    protected override Size MeasureContent(double widthConstraint, double heightConstraint)
    Parameters
    Type Name Description
    System.Double widthConstraint
    System.Double heightConstraint
    Returns
    Type
    Microsoft.Maui.Graphics.Size
    Overrides
    ButtonBase.MeasureContent(Double, Double)

    OnDraw(ICanvas, RectF)

    Drawing methods of chip control.

    Declaration
    protected override void OnDraw(ICanvas canvas, RectF dirtyRect)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.ICanvas canvas

    The canvas.

    Microsoft.Maui.Graphics.RectF dirtyRect

    The rect

    Overrides
    ButtonBase.OnDraw(ICanvas, RectF)

    OnPropertyChanged(String)

    Handles property changes for the SfChip control.

    Declaration
    protected override void OnPropertyChanged(string propertyName)
    Parameters
    Type Name Description
    System.String propertyName

    The name of the property that changed.

    Overrides
    ButtonBase.OnPropertyChanged(String)

    Events

    CloseButtonClicked

    CloseButton Clicked event handler.

    Declaration
    public event EventHandler<EventArgs> CloseButtonClicked
    Event Type
    Type
    System.EventHandler<System.EventArgs>

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved