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

How to set WPF RadContextMenu ExpandDirection to UP

3 Answers 116 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
Nag
Top achievements
Rank 1
Nag asked on 06 Jun 2013, 08:23 PM
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.

3 Answers, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 07 Jun 2013, 12:09 PM
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.

0
Nag
Top achievements
Rank 1
answered on 07 Jun 2013, 02:23 PM
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.
0
Accepted
Rosen Vladimirov
Telerik team
answered on 07 Jun 2013, 03:03 PM
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.

Tags
ContextMenu
Asked by
Nag
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Nag
Top achievements
Rank 1
Share this question
or