menu

MAUI

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

    Show / Hide Table of Contents

    Class AccordionItem

    Represents an item within the SfAccordion control.

    Inheritance
    System.Object
    SfView
    AccordionItem
    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
    SfView.ArrangeContent(Rect)
    SfView.ArrangeOverride(Rect)
    SfView.Children
    SfView.ClipToBounds
    SfView.GetSemanticsNodesCore(Double, Double)
    SfView.IDrawableLayout.DrawingOrder
    SfView.IDrawableLayout.InvalidateDrawable()
    SfView.MeasureContent(Double, Double)
    SfView.MeasureOverride(Double, Double)
    SfView.OnDraw(ICanvas, RectF)
    SfView.OnHandlerChanged()
    SfView.Padding
    Namespace: Syncfusion.Maui.Accordion
    Assembly: Syncfusion.Maui.Expander.dll
    Syntax
    public class AccordionItem : SfView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IThemeElement

    Constructors

    AccordionItem()

    Initializes a new instance of the AccordionItem class.

    Declaration
    public AccordionItem()

    Fields

    ContentProperty

    Identifies the Content bindable property.

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

    HeaderBackgroundProperty

    Identifies the HeaderBackground bindable property.

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

    HeaderIconColorProperty

    Identifies the HeaderIconColor bindable property.

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

    HeaderProperty

    Identifies the Header bindable property.

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

    IsExpandedProperty

    Identifies the IsExpanded bindable property.

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

    Properties

    Content

    Gets or sets the view for the content of the AccordionItem.

    Declaration
    public View Content { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.View
    Examples
        <syncfusion:AccordionItem.Content>
                    <Grid Padding = "10,10,10,10"
                        BackgroundColor="#FFFFFF">
                        <Label TextColor = "#303030"
                               Text="Hamburger accompanied with melted cheese. The term itself is a portmanteau of the words cheese and hamburger. The cheese is usually sliced, then added a short time before the hamburger finishes cooking to allow it to melt."
                               VerticalTextAlignment="Center" />
                       </Grid>
        </syncfusion:AccordionItem.Content>
    See Also
    Header

    Header

    Gets or sets the custom view that represents the header of the AccordionItem.

    Declaration
    public View Header { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.View
    Examples
    <syncfusion:AccordionItem.Header>
        <Grid>
            <Label TextColor ="#495F6E"
                Text="Cheese burger"
                    HeightRequest="50"
                    VerticalTextAlignment="Center" />
        </Grid>
    </syncfusion:AccordionItem.Header>
    See Also
    Content

    HeaderBackground

    Gets or sets the background color of the header in the AccordionItem.

    Declaration
    public Brush HeaderBackground { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.Brush
    See Also
    HeaderIconColor

    HeaderIconColor

    Gets or sets the color of the header icon in the AccordionItem.

    Declaration
    public Color HeaderIconColor { get; set; }
    Property Value
    Type
    Microsoft.Maui.Graphics.Color
    See Also
    HeaderBackground

    IsExpanded

    Gets or sets a value indicating whether the AccordionItem is expanded or collapsed.

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

    Methods

    ChangeVisualState()

    Helps to trigger the VisualState initially when View is loaded.

    Declaration
    protected override void ChangeVisualState()

    OnBindingContextChanged()

    Notifies the change in BindingContext for the accordion.

    Declaration
    protected override void OnBindingContextChanged()
    Overrides
    SfView.OnBindingContextChanged()

    OnCommonThemeChanged(String, String)

    Method invoke when theme dictionary contains syncfusion theme.

    Declaration
    public void OnCommonThemeChanged(string oldTheme, string newTheme)
    Parameters
    Type Name Description
    System.String oldTheme

    Old theme name.

    System.String newTheme

    New theme name.

    OnControlThemeChanged(String, String)

    Method invoke when theme changes are applied for internal properties.

    Declaration
    public void OnControlThemeChanged(string oldTheme, string newTheme)
    Parameters
    Type Name Description
    System.String oldTheme

    Old theme name.

    System.String newTheme

    New theme name.

    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