This is a migrated thread and some comments may be shown as answers.

Define ListBox inside ContextMenu

3 Answers 108 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Naseem
Top achievements
Rank 1
Naseem asked on 11 Jan 2011, 03:43 AM
Hello,

I'm planning to create a ContextMenu for a GridView . I know how to implement it. Just I'm wondering if there is any way for showing listbox inside context menu . I mean when user goes on a MenuItem , instead of showing the child MenuItems , it shows list box  . I thought to define all of my items as sub MenuItems in codebehind , however in case the number of items are a lot , it's better to have them in a ListBox or something like this.

I appreciate your help,

Thank you so much.

3 Answers, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 12 Jan 2011, 11:17 AM
Hi Naseem,

Thank you for contacting us.

Instead of putting a ListBox in the ContextMenu, I can suggest you to implement a scrollable ContextMenu as explained in this help article.

Hope this will help. Please let us know if you have any other questions about our controls.

All the best,
Konstantina
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Naseem
Top achievements
Rank 1
answered on 13 Jan 2011, 12:06 AM
Hello Konstantina ,

Thank you so much for the quick answer .

I have tried the solution you sent me . However that article is talking about RadMenu, not RadContextMenu . I have tried to change RadContextMenu Style but its style was different with the RadMenu and I'm not sure where I should put the ScrollViewer in RadContextMenu style as in RadMenu it's in Popup section and there is not Popup Section in RadContextMenu style. 

<ScrollViewer MaxHeight="300"BorderThickness="0"
                             Padding="0"
                             VerticalScrollbarVisibility="Auto">
                   <ItemsPresenter />
</ScrollViewer>

Thank you Konstantina ,

Kind Regards,
Naseem
0
Naseem
Top achievements
Rank 1
answered on 13 Jan 2011, 01:00 AM
Hi Konstantina ,

Sorry , my mistake . I should have changed RadMenuItem Style , not RadContextMenu . I did it and It's working nicely :)

Thank you so much ,

Kind Regards,
Naseem
Tags
Menu
Asked by
Naseem
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Naseem
Top achievements
Rank 1
Share this question
or