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

RadContextMenu Scrollbar not working

5 Answers 149 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 1
Robert asked on 19 Mar 2012, 08:46 PM
Hi, I've followed the instructions as per the following article > http://www.telerik.com/help/silverlight/radcontextmenu-how-to-add-scrolling-to-radcontextmenu.html

However, I can't get the scrollviewer to appear on the root context menu. Can someone please help me create a sample project with the style set for a scrollviewer? I can't attach a zip to this post, but all I did was add a context menu to a blank page, wrap the 2 (? the article says there should be 4 I think) ItemsPresenters in the generated code with a ScrollViewer. It works for the flyout menus, just not the root menu.

Thanks,
-Robert

5 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 20 Mar 2012, 07:11 PM
I'm getting ready to scrap the RadContextMenu completely. The sample does not work, or is incomplete from http://www.telerik.com/help/silverlight/radcontextmenu-how-to-add-scrolling-to-radcontextmenu.html.

Should I file a Bug report? It would be nice if the Telerik context menu rendered a Scrollbar automatically based on the height of the rendered Silverlight application. I'm dealing with some space restrictions Vertically, and a menu that does not fit. I've wasted a lot of time on the sample provided in your knowledgebase.
0
Accepted
Konstantina
Telerik team
answered on 22 Mar 2012, 02:10 PM
Hi Robert,

Sorry for the omission in the help article.

In order to add a ScrollBar to the root level item you need to generate and edit the template of the ContextMenu itself. Please find attached a sample application in which this is illustrated.

Please let us know if you have further questions.

All the best,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Robert
Top achievements
Rank 1
answered on 22 Mar 2012, 07:11 PM
Thanks for your help, that clarified things!
0
Michele
Top achievements
Rank 2
answered on 05 Apr 2012, 11:01 AM
Hello Konstantina  ,
I've tried the demo you provided on a WPF application but I got a weird problem... if I leave the ItemContainerStyle="{StaticResource RadMenuItemStyle}" I got the problem in the image I've attached (I don't see the submenu of item 1/2)

If I comment it out I got them but I don't have the scrollbar on the submenu

if you want try to put this code 

<telerik:RadContextMenu.ContextMenu>
            <telerik:RadContextMenu HorizontalAlignment="Left" VerticalAlignment="Top"  ItemContainerStyle="{StaticResource RadMenuItemStyle}"
                                    Style="{StaticResource RadContextMenuStyle}">
                <!--Opened="RadContextMenu_Opened"  -->
                <telerik:RadMenuItem Header="Item 1">
                    <telerik:RadMenuItem Header="Sub Item 1"/>
                    <telerik:RadMenuItem Header="Sub Item 2"/>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Header="Item 2">
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
 
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Header="Sub Item 3"/>
                <telerik:RadMenuItem Header="Sub Item 4"/>
                <telerik:RadMenuItem Header="Sub Item 5"/>
                <telerik:RadMenuItem Header="Sub Item 3"/>
                <telerik:RadMenuItem Header="Sub Item 4"/>
                <telerik:RadMenuItem Header="Sub Item 5"/>
                <telerik:RadMenuItem Header="Sub Item 3"/>
                <telerik:RadMenuItem Header="Sub Item 4"/>
                <telerik:RadMenuItem Header="Sub Item 5"/>
                <telerik:RadMenuItem Header="Sub Item 3"/>
                <telerik:RadMenuItem Header="Sub Item 4"/>
                <telerik:RadMenuItem Header="Sub Item 5"/>
            </telerik:RadContextMenu>
        </telerik:RadContextMenu.ContextMenu>

Thanks
0
Konstantina
Telerik team
answered on 09 Apr 2012, 04:47 PM
Hello Paolo,

Did you use the xaml code of the RadContextMenu for WPF, which can be found in the installation folder of Telerik components on your computer? If so, could you please send it here, so that we can review it - seems that the style is not correct and it is not applying.

Regards,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Menu
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Konstantina
Telerik team
Michele
Top achievements
Rank 2
Share this question
or