RadContextMenu Scrollbar not working

6 posts, 1 answers
  1. Robert
    Robert avatar
    12 posts
    Member since:
    Jun 2011

    Posted 19 Mar 2012 Link to this post

    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
  2. Robert
    Robert avatar
    12 posts
    Member since:
    Jun 2011

    Posted 20 Mar 2012 Link to this post

    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.
  3. DevCraft banner
  4. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 22 Mar 2012 Link to this post

    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 >>
  5. Robert
    Robert avatar
    12 posts
    Member since:
    Jun 2011

    Posted 22 Mar 2012 Link to this post

    Thanks for your help, that clarified things!
  6. Paolo
    Paolo avatar
    423 posts
    Member since:
    Jun 2009

    Posted 05 Apr 2012 Link to this post

    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
  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 09 Apr 2012 Link to this post

    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 >>
Back to Top
DevCraft banner