When the size is reduced the button's text is hidden and the popup occurs. One should be able to directly go to the collapsed mode without showing buttons with no text.
The attached project shows a temporary solution.
To reproduce:
1. Add a RadRibbonBar and add several buttons with images as follows:
public Form1()
{
InitializeComponent();
RibbonTab tabItem1 = new RibbonTab();
tabItem1.Text = "Manage";
radRibbonBar1.CommandTabs.Add(tabItem1);
RadRibbonBarGroup radRibbonBarGroup1 = new RadRibbonBarGroup();
radRibbonBarGroup1.Text = "radRibbonBarGroup1";
tabItem1.Items.Add(radRibbonBarGroup1);
RadButtonElement radButtonElement1 = new RadButtonElement();
radButtonElement1.Image = Properties.Resources.about;
radButtonElement1.TextImageRelation = TextImageRelation.ImageBeforeText;
radButtonElement1.Text = "First Button";
radRibbonBarGroup1.Items.Add(radButtonElement1);
RadButtonElement radButtonElement2 = new RadButtonElement();
radButtonElement2.Image = Properties.Resources.about;
radButtonElement2.TextImageRelation = TextImageRelation.ImageBeforeText;
radButtonElement2.Text = "Second Button";
radRibbonBarGroup1.Items.AddRange(new RadItem[] { radButtonElement1, radButtonElement2 });
RadRibbonBarButtonGroup radRibbonBarButtonGroup1 = new RadRibbonBarButtonGroup();
radRibbonBarButtonGroup1.Orientation = System.Windows.Forms.Orientation.Vertical;
radRibbonBarButtonGroup1.ShowBorder = true;
RadButtonElement radButtonElement3 = new RadButtonElement();
radButtonElement3.Text = "Button One";
radButtonElement3.Image = Properties.Resources.about;
radButtonElement3.TextImageRelation = TextImageRelation.ImageBeforeText;
RadButtonElement radButtonElement4 = new RadButtonElement();
radButtonElement4.Text = "Button Two";
radButtonElement4.Image = Properties.Resources.about;
radButtonElement4.TextImageRelation = TextImageRelation.ImageBeforeText;
radRibbonBarButtonGroup1.Items.AddRange(new RadItem[] { radButtonElement3, radButtonElement4 });
radRibbonBarGroup1.Items.Add(radRibbonBarButtonGroup1);
}
2. Run the applications, re-size the form horizontally until all buttons are collapsed to smallest size, then click the form's maximize button. As a result all buttons are drawn without text.
Workaround:
protected override void WndProc(ref Message message)
{
const int WM_SYSCOMMAND = 0x0112;
const int SC_MAXIMIZE = 0xF030;
switch (message.Msg)
{
case WM_SYSCOMMAND:
int command = message.WParam.ToInt32() & 0xfff0;
if (command == SC_MAXIMIZE)
{
this.Size = new System.Drawing.Size(300, 300);
}
break;
}
base.WndProc(ref message);
}
Structure:
How to reproduce:
Result:
the menu will be repainted over the dialogform
Using the Fluent theme.
Sometimes the popped up menu is just plain white, sometimes its painted correctly (showing buttons) but always over the DialogForm.
thanks
When a form's width is reduced enough then some groups in ribbon bar will become collapsed and in group's place a drop-down arrow is shown. When this arrow is clicked it will show properly its active state in all themes except three Metro themes. In Metro themes arrow's active state is such that only upper half of the control is visible. The issue is shown in current documentation for RadRibbonBar in the following image:

In RadDropDownListElement add two DescriptionTextListDataItem:
radDropDownListElementFoo.Items.Add(new DescriptionTextListDataItem("Foo 1", "Description 1"));
radDropDownListElementFoo.Items.Add(new DescriptionTextListDataItem("Foo 2", "Description 2"));
But the description is not displayed and the drop down height is too large (foo.png)
What am I doing wrong?
If change ItemHeight = 36, then description is displayed, but the drop down height is too large (foo36.png)
To reproduce:
Open a form with a ribbon, focus the tabs and press 1 with the screen keyboard (German language).
Workaround:
class MyRibbon : RadRibbonBar
{
protected override ComponentInputBehavior CreateBehavior()
{
return new MyComponentBehavior(this);
}
public override string ThemeClassName
{
get { return typeof(RadRibbonBar).FullName; }
}
}
class MyComponentBehavior : RibbonBarInputBehavior
{
public MyComponentBehavior(RadRibbonBar owner) : base(owner)
{
}
protected override string GetKeyStringRepresentation(Keys input)
{
uint nonVirtualKey = NativeMethods.MapVirtualKey((uint)input, 2);
if (nonVirtualKey > char.MaxValue)
{
return null;
}
return base.GetKeyStringRepresentation(input);
}
}
To reproduce: - Add a RadToggleButtonElement to the quick access toolbar. Workaround: RadToggleButton button = new RadToggleButton(); button.Text = "Test"; button.Height = 17; RadHostItem host = new RadHostItem(button); host.MinSize = new Size(50, 0); host.MaxSize = new Size(0, 17); host.StretchVertically = false; radRibbonBar1.QuickAccessToolBarItems.Add(host);
Enable duplication of RadRibbonBar group's element.
1. Place a RadRibbonBar on a form 2. Add couple of New Tabs 3. Select a tab in Design Time 4. You will see that the current tab is not switched Note that you can switch to a different tab if you click it 3 times or if you fast click twice on a tab and then select another tab.
To reproduce: please refer to the attached sample project and gif file.
Workaround: this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DropDownOpened+=ApplicationButtonElement_DropDownOpened;
private void ApplicationButtonElement_DropDownOpened(object sender, EventArgs e)
{
foreach (RadItem item in this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.DropDownMenu.Items)
{
RadMenuItem menuItem = item as RadMenuItem;
if (menuItem!=null)
{
menuItem.MinSize = new Size(item.Size.Width, 24);
}
}
}
Workaround: this.radDropDownButtonElement1.ActionButton.TextElement.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
To reproduce: please run the attached sample project and follow the steps from the gif file.
Workaround: close the popup before showing the message or the dialog:
private void radButtonElement1_Click(object sender, EventArgs e)
{
if (!radRibbonBar1.Expanded)
{
this.radRibbonBar1.RibbonBarElement.Popup.ClosePopup(Telerik.WinControls.UI.RadPopupCloseReason.Mouse);
}
RadMessageBox.Show("Test");
}
How to reproduce: subcribe to the Click event handled of a RadSplitButtonElement added to a certain group in RadRibbonBar, notice that when you click on the button the event will fire two times
Workaround:
bool cancel;
private void radSplitButtonElement1_Click(object sender, EventArgs e)
{
if (!cancel)
{
//Handle Click event;
this.cancel = true;
return;
}
this.cancel = false;
}
The new functionality should provide a way to apply an offset to the position of the key tip as well as customize their back and fore colors as well as the font
Use attached project to reproduce. Workaround radRibbonBar1.StartMenuItems.RemoveAt(0);
To reproduce: click the application menu drop down to open the backstage view. Then, click the button again to close it. You will notice that the BackstageViewClosing/BackstageViewClosed events are fired twice
To reproduce: LightVisualElement caption = new LightVisualElement(); caption.MinSize = new Size(150, 20); caption.DrawText = true; caption.DrawImage = true; caption.TextImageRelation = TextImageRelation.ImageBeforeText; caption.Text = "My Application"; caption.Image = Image.FromFile(@"..\..\delete.png"); caption.ShouldHandleMouseInput = false; caption.NotifyParentOnMouseInput = true; caption.ImageLayout = ImageLayout.None; caption.ImageAlignment = ContentAlignment.TopLeft; caption.TextAlignment = ContentAlignment.TopLeft; this.radRibbonBar1.RibbonBarElement.RibbonCaption.CaptionLayout.Children.Add(caption);