Skip to main content

DxAccordion.GetItemInfo(Func<IAccordionItemInfo, Boolean>) Method

Returns information about the specified item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public IAccordionItemInfo GetItemInfo(
    Func<IAccordionItemInfo, bool> predicate
)

Parameters

Name Type Description
predicate Func<IAccordionItemInfo, Boolean>

The specified item.

Returns

Type Description
IAccordionItemInfo

Information about the found item.

Remarks

Use the GetItemInfo method to obtain information about a specified item. If the Accordion component contains several items that satisfy the condition, the GetItemInfo method returns information about the first item.

The following code snippet returns the item’s information based on the Text property value:

<DxButton Click=@OnClick>Get info</DxButton>

<DxAccordion @ref=Accordion>
    <Items>
        <DxAccordionItem Text="Grid" />
        <DxAccordionItem Text="Navigation and Layout">
            <Items>
                <DxAccordionItem Text="Accordion" />
                <DxAccordionItem Text="Stack Layout" />
            </Items>
        </DxAccordionItem>
        <DxAccordionItem Text="Data Editors" />
        <DxAccordionItem Text="Scheduler" />
    </Items>
</DxAccordion>

@code {
    DxAccordion Accordion;
    void OnClick() {
        var Item = Accordion.GetItemInfo(x => x.Text == "Navigation and Layout");
    }
}
See Also