blazor-devexpress-dot-blazor-dot-dxaccordionitem-3b29c065.md
Specifies whether the item becomes selected if its NavigateUrl property value matches the active web page. If the control does select the item, it expands all parent items.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(null)]
[Parameter]
public NavigationUrlMatchMode? UrlMatchMode { get; set; }
| Type | Default | Description |
|---|---|---|
| Nullable<NavigationUrlMatchMode> | null |
A NavigationUrlMatchMode enumeration value.
|
Available values:
| Name | Description |
|---|---|
| None |
Automatic selection synchronization is disabled.
| | CurrentPath |
The component selects an item if the item’s NavigateUrl property value matches the current browser URL. The query string appended to the URL is ignored.
| | Prefix |
The component selects an item if the item’s NavigateUrl property value starts with the current browser URL and vice versa.
| | Exact |
The component selects an item if the item’s NavigateUrl property value matches the current browser URL.
|
Use the DxAccordionItem.UrlMatchMode property to specify in what cases the Accordion component selects the item based on its NavigateUrl property value and the current browser URL. If you do not specify the item’s UrlMatchMode, the Accordion uses its own UrlMatchMode property.
In the following example, multiple parameterized pages select the Employee item. To select the Overview page only when it is active, the code example sets the first item’s UrlMatchMode to Exact:
<DxAccordion SelectionMode="NavigationSelectionMode.Single"
UrlMatchMode="NavigationUrlMatchMode.Prefix">
<Items>
<DxAccordionItem NavigateUrl="./" Text="Overview" UrlMatchMode="NavigationUrlMatchMode.Exact" />
<DxAccordionItem Text="Employee" NavigateUrl="employeeList" />
</Items>
</DxAccordion>
@page "/employeeList/{employeeid:int}"
<h3>Employee Id</h3>
@EmployeeId
@code {
[Parameter]
public int? EmployeeId { get; set; }
}
View Example: Use the Accordion to organize navigation in the application
See Also