Back to Devexpress

AccordionControl.RootItemExpandButtonPosition Property

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

latest4.5 KB
Original Source

AccordionControl.RootItemExpandButtonPosition Property

Gets or sets the position of the expand-collapse button within the 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 ExpandButtonPosition RootItemExpandButtonPosition { get; set; }
vb
Public Property RootItemExpandButtonPosition As ExpandButtonPosition

Property Value

TypeDescription
ExpandButtonPosition

An ExpandButtonPosition enumeration value.

|

Available values:

NameDescription
None

The expand button is not displayed.

| | Left |

The expand button is displayed at the left side of the accordion item.

| | Right |

The expand button is displayed at the right side of the accordion item.

|

Remarks

Use the following properties to hide the expand-collapse button or change its position:

PropertyDescription
AccordionItem.ExpandButtonPositionSpecifies the expand-collapse button‘s position for the current accordion item.
RootItemExpandButtonPositionSpecifies the expand-collapse button‘s position for all root items.
AccordionControl.SubItemExpandButtonPositionSpecifies the expand-collapse button‘s position for all subitems.

The code sample below demonstrates how to show the expand-collapse button at root items’ left side:

xaml
<dxa:AccordionControl RootItemExpandButtonPosition="Left"> ... </dxa:AccordionControl>

The image below shows the result:

Refer to the Expanding and Collapsing topic to learn more.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RootItemExpandButtonPosition 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