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

CommandBarDropDownButton - menu sizing issue

1 Answer 103 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
David A.
Top achievements
Rank 1
David A. asked on 18 Jun 2011, 06:07 PM
Hi,

When using a CommandBarDropDownButton and having two menu items, the sizing appears to be off (see attached image) and there is a lot of extra padding at the bottom.  This works fine with 3 or more menu items.  Is there a way to correct this?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Todorov
Telerik team
answered on 22 Jun 2011, 07:26 PM
Hello David A,

Thank you for your question.

This is a known issue of CommandBarDropDownButton which will be addressed in the next major release. For the time being, I can suggest the following workaround:

public class MyCommandBarDropDownButton : CommandBarDropDownButton
{
    public MyCommandBarDropDownButton()
    {
        this.arrowButton.Arrow.ForeColor = Color.FromArgb(255, 21 ,66, 139);
    }
 
    public override void ShowDropdown()
    {
        RadControl parentControl = (this.ElementTree.Control as RadControl);
        if (parentControl != null)
        {
            dropDownMenu.ThemeName = parentControl.ThemeName;
        }
 
        dropDownMenu.Show(this, 0, this.Size.Height);
    }
 
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(CommandBarDropDownButton);
        }
    }
}

I hope this is helpful. Feel free to ask if you have any additional questions.

All the best,
Ivan Todorov
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
CommandBar
Asked by
David A.
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Share this question
or