Implementing collapsible items in RadMenuGroupItem

0 Answers 57 Views
Menu
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
Ohad asked on 18 May 2023, 09:01 AM | edited on 18 May 2023, 09:36 AM

I'm facing an issue with the RadMenu control. I have a requirement where I need to display a menu with collapsible items, and I would like some guidance on how to implement this functionality.

Here's a simplified example of my current XAML code:

<telerik:RadMenu>
    <telerik:RadMenuItem Header="Menu">
        <telerik:RadMenuGroupItem ItemsSource="{Binding Alist}" Header="A"/>
        <telerik:RadMenuGroupItem ItemsSource="{Binding Blist}" Header="B"/>
    </telerik:RadMenuItem>
</telerik:RadMenu>

In this example, I have two RadMenuGroupItems, "A" and "B", each bound to a separate list (Alist and Blist respectively). Currently, the items are displayed in an expanded state by default.

However, I would like to achieve the following behavior:

1. Initially, all the items in the lists should be collapsed, i.e., hidden.

2. Users should be able to expand and collapse the items by clicking on the respective RadMenuGroupItem headers. When the header is clicked, the items should toggle between being expanded (visible) and collapsed (hidden).

Is there a built-in way to achieve this behavior in the RadMenu or RadMenuGroupItem controls? If not, could you please provide some guidance on how I can implement this functionality myself?

I appreciate any assistance or code examples you can provide to help me accomplish this requirement.

Thank you in advance for your help.

No answers yet. Maybe you can help?

Tags
Menu
Asked by
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
Share this question
or