Class AccordionItem
Represents an item within the SfAccordion control.
Implements
Inherited Members
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
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
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
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
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
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. |