The theme component is added to the form:
Here is the code:
Public Class RadRibbonForm1
Sub New()
InitializeComponent()
Me.AllowAero = False
End Sub
Private Sub RadButtonElement1_Click(sender As Object, e As EventArgs) Handles RadButtonElement1.Click
ThemeResolutionService.ApplicationThemeName = "Office2010Blue"
End Sub
End Class
In this case, the group is in collapsed mode. When we open its drop-down button to see the elements inside and afterward expand the form to see the whole group, the theme of the group is reset. Moving the mouse over the group will reset the theme.
The caption text of the RibbonBarGroups disappears when switching themes runtime. The important part is that this behavior is observable when switching from the Office2010Blue theme to other themes. In this specific theme, the FillPrimitive holding the TextPrimitive (caption text) has the PositionOffset property set to 0,-1. This minus one pixel is messing up the layout during theme change.
What can be done as a workaround is to reset this property for every group. When the Office2010Blue theme is applied run this code:
private void radButton1_Click(object sender, EventArgs e)
{
Office2010BlueTheme theme = new Office2010BlueTheme();
ThemeResolutionService.ApplicationThemeName = "Office2010Blue";
foreach (var item in this.ribbonTab1.Items)
{
if (item is RadRibbonBarGroup)
{
var group = item as RadRibbonBarGroup;
group.Children[1].Children[0].PositionOffset = new SizeF(0, 0);
}
}
}
1. Enable Backstage view mode
radRibbonBar1.ApplicationMenuStyle = Telerik.WinControls.UI.ApplicationMenuStyle.BackstageView;
2. Add BackstageButtonItem and BackstageTabItem to the Application Menu.
3. Run the program and run the accessibility tool "inspect.exe"
4. Select MSAA in "inspect.exe" and hover over a Backstage item.
As you can see in the attached screenshot BackstageButtonItems and BackstageTabItems are not accessible by inspect.exe.
Hello,
When using radsplitbutton in a ribbon, when the ribbonbargroup is collapsed due to a form too small, then the click event on the button part is not fired.
When clicking the button, the radsplitbutton look like it is "checked" instead, the popup is not open.
This has been tested in 2021.1.204.40, I apologize if this has been fixed in between.
Thanks
This is the behavior for collapsing the ribbon and showing the the small image for RadButtonElement: https://docs.telerik.com/devtools/winforms/controls/ribbonbar/designing-radribbonbar/using-large-and-small-images
A similar functionality should be available for the ActionElement in RadDropDownButtonElement and RadSplitButtonElement.
Dear,
look at video attached,
I'm using app theme resolution windows 7, but in RadRibbonForm the caption draw very awfull. This happens since always I use Telerik, but now I got some time to report to you.
ThemeResolutionService.ApplicationThemeName = "Windows7";
What I do?
Best,
Jeff
Please refer to the attached sample project and follow the steps from the gif file.
You will notice that each time a random group displays only images (no text) when the groups don't fit in the ribbon's width.
Workaround:
public MDIForm()
{
InitializeComponent();
this.radRibbonBar1.RibbonBarElement.ItemVisiblityStateChanging += this.RibbonBarElement_ItemVisiblityStateChanging;
}
private void RibbonBarElement_ItemVisiblityStateChanging(object sender, ItemVisiblityStateChangingEventArgs args)
{
if (args.NextVisibilityState == ChunkVisibilityState.NoText)
{
args.Cancel = true;
}
}
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); } } }
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"); }
To reproduce: - Add complex controls to the backstage pages (add at least 4 pages). - Change the pages at runtime. Workaround: Private Sub RadRibbonBarBackstageView1_BackstageViewOpening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles RadRibbonBarBackstageView1.BackstageViewOpening BackstageViewPage1.Visible = True BackstageViewPage2.Visible = True BackstageViewPage3.Visible = True BackstageViewPage4.Visible = True End Sub
To reproduce: 1. Collapse the ribbon 2. Select the tab to show the popup 3. Type some text in the RadDropDownListElement 4. Press Escape, Enter, Backspace keys. You will notice that these keys are not handled by the drop down. However, the ribbon popup is closed and there is no way to handle these keys.
Use the attached project to reproduce. Workaround: private void RadForm1_SizeChanged(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Normal) { this.SizeChanged -= RadForm1_SizeChanged; this.Size = new Size(this.Size.Width + 1, this.Size.Height + 1); this.Size = new Size(this.Size.Width - 1, this.Size.Height - 1); this.SizeChanged += RadForm1_SizeChanged; } }
If I left-click on one of tab header, the related tab expand itself showing all the contained items. But, if I expand the tab using the mouse right button, the tab expand itself but it appears blank! Workaround: private void radRibbonBar1_MouseDown(object sender, MouseEventArgs e) { RibbonTab tab = this.radRibbonBar1.ElementTree.GetElementAtPoint(e.Location) as RibbonTab; if (tab!=null && e.Button== System.Windows.Forms.MouseButtons.Right) { tab.IsSelected = true; } }
How to reproduce: set a size in the designer, when the form loads its size will not be the same as the one set Workaround: set the size in the Load event of the ribbon form private void Form_Shown(object sender, EventArgs e) { this.Size = new Size(600, 600); }