menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfAccordionItem - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfAccordionItem

    Represents a control that displays a header and has a collapsible content window.

    Inheritance
    System.Object
    SfAccordionItem
    Implements
    System.IDisposable
    Namespace: Syncfusion.Windows.Controls.Layout
    Assembly: Syncfusion.SfAccordion.WPF.dll
    Syntax
    public class SfAccordionItem : HeaderedContentControl, IUpdateVisualState, IDisposable

    Constructors

    SfAccordionItem()

    Initializes a new instance of the AccordionItem class.

    Declaration
    public SfAccordionItem()

    Fields

    AccordionButtonStyleProperty

    Identifies the AccordionButtonStyle dependency property.

    Declaration
    public static readonly DependencyProperty AccordionButtonStyleProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ContentTargetSizeProperty

    Identifies the ContentTargetSize dependency property.

    Declaration
    public static readonly DependencyProperty ContentTargetSizeProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ExpandableContentControlStyleProperty

    Identifies the ExpandableContentControlStyle dependency property.

    Declaration
    public static readonly DependencyProperty ExpandableContentControlStyleProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    IsSelectedProperty

    Identifies the IsSelected dependency property.

    Declaration
    public static readonly DependencyProperty IsSelectedProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    AccordionButtonStyle

    Gets or sets the Style used by AccordionButton.

    Declaration
    public Style AccordionButtonStyle { get; set; }
    Property Value
    Type
    System.Windows.Style

    ContentTargetSize

    Gets the Size that the content will animate to.

    Declaration
    public Size ContentTargetSize { get; }
    Property Value
    Type
    System.Windows.Size

    ExpandableContentControlStyle

    Gets or sets the Style used by ExpandableContentControl.

    Declaration
    public Style ExpandableContentControlStyle { get; set; }
    Property Value
    Type
    System.Windows.Style

    IsLocked

    Gets a value indicating whether the AccordionItem cannot be selected by the user.

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

    True if this instance is locked; otherwise, false.

    Remarks

    The IsSelected property may not be changed when the AccordionItem is locked. Locking occurs when the item is the first in the list, the SelectionMode of Accordion requires atleast one selected AccordionItem and the AccordionItem is currently selected.

    IsSelected

    Gets or sets a value indicating whether the AccordionItem is selected and its content window is visible.

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

    Methods

    Dispose()

    Represents dispose method for disposing unwanted objects

    Declaration
    public void Dispose()

    Dispose(Boolean)

    To remove all the instance which is used in SfAccordionItem

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    OnAccordionButtonStyleChanged(Style, Style)

    Called when AccordionButtonStyle is changed.

    Declaration
    protected virtual void OnAccordionButtonStyleChanged(Style oldStyle, Style newStyle)
    Parameters
    Type Name Description
    System.Windows.Style oldStyle

    The old style.

    System.Windows.Style newStyle

    The new style.

    OnApplyTemplate()

    Builds the visual tree for the AccordionItem control when a new template is applied.

    Declaration
    public override void OnApplyTemplate()

    OnExpandableContentControlStyleChanged(Style, Style)

    Called when ExpandableContentControlStyle is changed.

    Declaration
    protected virtual void OnExpandableContentControlStyleChanged(Style oldStyle, Style newStyle)
    Parameters
    Type Name Description
    System.Windows.Style oldStyle

    The old style.

    System.Windows.Style newStyle

    The new style.

    OnGotFocus(RoutedEventArgs)

    Provides handling for the GotFocus event.

    Declaration
    protected override void OnGotFocus(RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.RoutedEventArgs e

    The data for the event.

    OnKeyDown(KeyEventArgs)

    Provides handling for the KeyDown event.

    Declaration
    protected override void OnKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    Key event args.

    OnLostFocus(RoutedEventArgs)

    Provides handling for the LostFocus event.

    Declaration
    protected override void OnLostFocus(RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.RoutedEventArgs e

    The data for the event.

    OnMouseEnter(MouseEventArgs)

    Occurs when the focus is obtained

    Declaration
    protected override void OnMouseEnter(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    OnMouseLeave(MouseEventArgs)

    Occurs when the focus is lost

    Declaration
    protected override void OnMouseLeave(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    OnMouseLeftButtonDown(MouseButtonEventArgs)

    Occurs when the focus is obtained

    Declaration
    protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnMouseLeftButtonUp(MouseButtonEventArgs)

    Occurs when the focus is obtained

    Declaration
    protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnSelected()

    Raises the Selected event when the IsSelected property changes from false to true.

    Declaration
    protected virtual void OnSelected()

    OnUnselected()

    Raises the Unselected event when the IsSelected property changes from true to false.

    Declaration
    protected virtual void OnUnselected()

    Events

    Selected

    Occurs when the accordionItem is selected.

    Declaration
    public event RoutedEventHandler Selected
    Event Type
    Type
    System.Windows.RoutedEventHandler

    Unselected

    Occurs when the accordionItem is unselected.

    Declaration
    public event RoutedEventHandler Unselected
    Event Type
    Type
    System.Windows.RoutedEventHandler

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved