Maximum DropDownHeight

2 posts, 0 answers
  1. Etienne
    Etienne avatar
    47 posts
    Member since:
    Sep 2014

    Posted 08 Jan 2015 Link to this post

    Hi,

    I have a contextual menu with submenu and some of them are bound to an items source. I use DropDownHeight to limit the height of a sub menu but since the quantity of item displayed can change, it happens that I have space left at the end of my menu when there isn't a lot of item. Is there a way to set a maximum height to the drop down, that doesn't impose a minimum ?

    Thank you,

    Etienne
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 13 Jan 2015 Link to this post

    Hi Etienne,

    Thank you for contacting us.

    I'm afraid the MenuItem doesn't provide such a property. You would need to manually set the desired MaxHeight in the MenuItemTemplate of the first Grid inside of the Popup named PART_Popup:

    <Popup x:Name="PART_Popup" ...>
             <Grid Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}" MaxHeight="200">
    ...

    However I logged this as Feature Request in our Feedback portal, so you can track and vote for the item on the following link:
    http://feedback.telerik.com/Project/143/Feedback/Details/148248-implement-dropdownmaxheight-property-for-radmenuitem

    Hope this helps.

    Regards,
    Kalin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top