Back to Devexpress

AccordionControl.ViewMode Property

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

latest3.7 KB
Original Source

AccordionControl.ViewMode Property

Gets or sets how the AccordionControl displays its root items. This is a dependency property.

Namespace : DevExpress.Xpf.Accordion

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

NuGet Package : DevExpress.Wpf.Accordion

Declaration

csharp
public AccordionViewMode ViewMode { get; set; }
vb
Public Property ViewMode As AccordionViewMode

Property Value

TypeDescription
AccordionViewMode

An AccordionViewMode enumeration value. The default is AccordionViewMode.Accordion.

|

Available values:

NameDescription
Accordion

All root and children items are displayed.

| | NavigationPane |

Only child items of a single root item specified by the AccordionControl.SelectedRootItem property are displayed.

|

Remarks

Use the ViewMode property to specify how the AccordionControl displays its root items: in navigation pane or as accordion root items.

The AccordionControl displays the subitems of the selected root item in AccordionViewMode.NavigationPane mode. You can specify the selected root item using the AccordionControl.SelectedRootItem property.

The AccordionControl automatically switches to AccordionViewMode.NavigationPane mode when integrated with OfficeNavigationBar.

Virtualization is not supported in the AccordionViewMode.NavigationPane mode.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ViewMode property.

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-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}">

See Also

AccordionControl Class

AccordionControl Members

DevExpress.Xpf.Accordion Namespace