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

Horizontal Context Menu?

1 Answer 87 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cindy
Top achievements
Rank 1
Cindy asked on 30 Dec 2014, 10:04 PM
Is there a way to position the context menu items horizontally rather than vertically?

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 01 Jan 2015, 10:36 AM
Hello Cindy,

Thank you for contacting us! By default context menu is displayed only vertical. However, you can easily customize its appearance by applying style for its items template panel:

<telerikPrimitives:RadContextMenu.ItemsPanel>
    <ItemsPanelTemplate>
        <StackPanel x:Name="ItemsPanel" Orientation="Horizontal" HorizontalAlignment="Center"/>
    </ItemsPanelTemplate>
</telerikPrimitives:RadContextMenu.ItemsPanel>

I have prepared sample project demonstrating how to achieve this. In addition, I have modified the template of the menu to prevent stretching it on the screen width. (as I assume this scenario is related to this - http://www.telerik.com/community/forums/change-width-of-contextmenu)

Regards,
Tsvyatko
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.

 
Tags
ContextMenu
Asked by
Cindy
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or