Completed
Last Updated: 19 Jun 2017 12:16 by ADMIN
ADMIN
Hristo
Created on: 27 Mar 2017 11:02
Category: RibbonBar
Type: Bug Report
1
FIX. RadRibbonBar - the caption element of a ribbon bar group is cut off when displayed in a drop down menu popup
The issue can be reproduced after creating ribbon groups with buttons having large pictures and TextImageRelation set to ImageAboveText

Workaround: handle the DropDownOpened event of the buttons and set a MaxSize to the ElementWithCaptionLayoutPanel child
public Form1()
{
    InitializeComponent();

    //Workaround
    this.radRibbonBarGroup1.DropDownElement.DropDownOpened += DropDownElement_DropDownOpened;
    this.radRibbonBarGroup2.DropDownElement.DropDownOpened += DropDownElement_DropDownOpened;
    this.radRibbonBarGroup3.DropDownElement.DropDownOpened += DropDownElement_DropDownOpened;
}

private void DropDownElement_DropDownOpened(object sender, EventArgs e)
{
    RadRibbonBarGroupDropDownButtonElement element = (RadRibbonBarGroupDropDownButtonElement)sender;
    RadRibbonBarGroupDropDownMenuElement menuElement = (RadRibbonBarGroupDropDownMenuElement)element.DropDownMenu.PopupElement;
    ElementWithCaptionLayoutPanel layoutPanel = menuElement.Layout.FindDescendant<ElementWithCaptionLayoutPanel>();
    menuElement.Layout.FindDescendant<ElementWithCaptionLayoutPanel>().MaxSize = new Size(0, 77);
}
0 comments