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

How can I make RadDropdownMenu shorter by theme?

4 Answers 63 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Jacky
Top achievements
Rank 1
Jacky asked on 05 Jul 2014, 03:40 AM
I want to short the width of RadDropdownMenuItem,  but after i set the MaxSize, a horizontal scroll bar was shown, very ugly. 

Q1.jpg   it is I want to, this is the design.
Q2.jpg   I set Maxsize to force menuitem shorter.

4 Answers, 1 is accepted

Sort by
0
Jacky
Top achievements
Rank 1
answered on 05 Jul 2014, 03:43 AM
PS,
        Q1. jpg is the design picture drawn by photoshop.  
        Q2.jpg is the question.
0
Dimitar
Telerik team
answered on 09 Jul 2014, 12:42 PM
Hello Jacky,

Thank you for writing.

Could you please specify what is the exact control that you are currently using to host the items (is it a context menu or drop down button)? I am asking this since I cannot determine it by the picture and the solution will depend on that.

I am looking forward to your reply.
 
Regards,
Dimitar
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Jacky
Top achievements
Rank 1
answered on 10 Jul 2014, 03:02 AM
RadContextMenu
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 14 Jul 2014, 12:41 PM
Hello Jacky,

Thank you for writing back.

It is possible to resize the items in the RadContextMenu and hide the vertical/horizontal scroll bars via code:
public Form1()
{
    InitializeComponent();
 
    for (int i = 0; i < 5; i++)
    {
        RadMenuItem item = new RadMenuItem("Item." + i);
        item.FillPrimitive.BackColor = Color.FromArgb(238, 238, 238);
        item.Padding = new Padding(-20,0,0,0);
        this.radContextMenu1.Items.Add(item);
    }
    
    this.radContextMenu1.DropDown.PopupElement.MaxSize = new Size(50, this.radContextMenu1.DropDown.PopupElement.Size.Height);
    RadDropDownMenuElement dropdown = this.radContextMenu1.DropDown.PopupElement as RadDropDownMenuElement;
 
    dropdown.ScrollPanel.HorizontalScrollState = ScrollState.AlwaysHide;
    dropdown.ScrollPanel.VerticalScrollState = ScrollState.AlwaysHide;
}

I hope this information helps. If you have any additional questions, please let me know.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Themes and Visual Style Builder
Asked by
Jacky
Top achievements
Rank 1
Answers by
Jacky
Top achievements
Rank 1
Dimitar
Telerik team
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or