Back to Devexpress

AccordionControl Class

wpf-devexpress-dot-xpf-dot-accordion.md

latest5.6 KB
Original Source

AccordionControl Class

Represents the Accordion Control.

Namespace : DevExpress.Xpf.Accordion

Assembly : DevExpress.Xpf.Accordion.v25.2.dll

NuGet Package : DevExpress.Wpf.Accordion

Declaration

csharp
[DXLicenseWpf]
public class AccordionControl :
    Control,
    INavigatorClient,
    INotifyPropertyChanged,
    ISupportAiSmartSearchAccordionControl,
    ISupportAiSmartSearch
vb
<DXLicenseWpf>
Public Class AccordionControl
    Inherits Control
    Implements INavigatorClient,
               INotifyPropertyChanged,
               ISupportAiSmartSearchAccordionControl,
               ISupportAiSmartSearch

The following members return AccordionControl objects:

Remarks

The AccordionControl is an advanced navigation control that allows you to create hierarchical user interfaces that are compact and easy to navigate.

Refer to Accordion Control to learn more.

Example

xaml
<dxa:AccordionControl>
    <dxa:AccordionItem Header="Home">
        <dxa:AccordionItem Header="Products"/>
        <dxa:AccordionItem Header="Downloads"/>
    </dxa:AccordionItem>
    <dxa:AccordionItem Header="Get Help">
        <dxa:AccordionItem Header="Support"/>
        <dxa:AccordionItem Header="Documentation"/>
    </dxa:AccordionItem>
    <dxa:AccordionItem Header="Client Center"/>
</dxa:AccordionControl>

The following code snippets (auto-collected from DevExpress Examples) contain references to the AccordionControl class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-mvvm-framework-view-model-generator/CS/Framework 4.6.1/MainWindow.xaml#L16

xml
</Grid.ColumnDefinitions>
<dxa:AccordionControl dxmvvm:UIRegion.Region="{x:Static local:Regions.Navigation}" />
<ContentPresenter dxmvvm:UIRegion.Region="{x:Static local:Regions.ViewContent}" Grid.Column="1" />

wpf-accordion-customize-appearance/CS/AppearanceCustomization/MainWindow.xaml#L17

xml
<dx:ThemedWindow.Resources>
    <Style TargetType="dxa:AccordionControl">
        <Setter Property="Background" Value="#fdfdfd"/>

wpf-create-a-fluent-design-using-appearance-options/CS/FluentDesignTemplate/MainWindow.xaml#L83

xml
</Grid.RowDefinitions>
<dxa:AccordionControl RootItemExpandButtonPosition="None" ViewMode="Accordion" Background="Transparent" BorderThickness="0" AutoExpandAllItems="True">
    <dxa:AccordionItem Header="MENU" Style="{StaticResource accordionHeadItemStyle}">

wpf-accordion-bind-to-data-hierarchicaldatatemplate/CS/HierarchicalDataTemplate/MainWindow.xaml#L20

xml
<Border Margin="5" Grid.Column="0" BorderBrush="Black" BorderThickness="1">
    <dxa:AccordionControl x:Name="accordion" SelectionUnit="SubItem"
                          ItemsSource="{Binding MyData.Categories }" SelectedItem="{Binding SelectedItem}">

wpf-accordion-bind-to-data-using-childrenpath/CS/ChildrenPath/MainWindow.xaml#L20

xml
<Border Margin="5" Grid.Column="0" BorderBrush="Black" BorderThickness="1">
    <dxa:AccordionControl Name="accordion" ItemsSource="{Binding AppMenu.MenuItems }"
                          SelectedItem="{Binding SelectedItem}"

Inheritance

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control AccordionControl

See Also

AccordionControl Members

DevExpress.Xpf.Accordion Namespace