How to set WPF RadContextMenu ExpandDirection to UP

4 posts, 1 answers
  1. Nag
    Nag avatar
    3 posts
    Member since:
    Aug 2012

    Posted 06 Jun 2013 Link to this post

    How to set the expand direction of the WPF radcontextmenu to UP, so that when I click on expand, the submenuitem popup expands right and upwards.
  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 07 Jun 2013 Link to this post

    Hello,

    I suggest you to use Placement mode of RadContextMenu. For example you can set it to Top and when you right-click the element, on which the menu is attached, RadContextMenu will be opened at the top of the element. With our 2013 Q2 Beta release, we have added DropDownPosition property for RadMenuItem. This way you can control the position of the submenu items, for example if you have RadMenuItem with Header "File" and three subitems, you can set DropDownPosition of the file item to "Left" and the three menu items will be show on the left of the file item.

    Hopefully this helps. Feel free to contact us in case you have any problems or concerns.

    Regards,
    Rosen Vladimirov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Nag
    Nag avatar
    3 posts
    Member since:
    Aug 2012

    Posted 07 Jun 2013 Link to this post

    Hi,

    The ContextMenu Placement=Top is working good, but the Submenu Popup is not directing to the top. Is there a way to set submenuitems placement? So, What are the options do I have?

    Thank you.
  5. Answer
    Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 07 Jun 2013 Link to this post

    Hi,

    As I said in my previous mail, you have to use our beta release in order to control the position of the submenu popup. We have added DropDownPlacement property. As an example you may use the code below:
    <Rectangle Width="100" Height="100" Fill="AliceBlue">
        <telerik:RadContextMenu.ContextMenu>
            <telerik:RadContextMenu Placement="Top">
                <telerik:RadMenuItem Header="Item 1" DropDownPlacement="Top">
                    <telerik:RadMenuItem Header="Item 1.1"/>
                    <telerik:RadMenuItem Header="Item 1.2"/>
                    <telerik:RadMenuItem Header="Item 1.3"/>
                    <telerik:RadMenuItem Header="Item 1.4"/>
                    <telerik:RadMenuItem Header="Item 1.5"/>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Header="Item 2"/>
            </telerik:RadContextMenu>
        </telerik:RadContextMenu.ContextMenu>
    </Rectangle>

    You can check the result in the attached image.

    Regards,
    Rosen Vladimirov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top