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);
}
}
}
To reproduce:
1. Add a form with a RadRibbonBar and add some tabs
2. Create a second form that inherits the first one
3. Open the second form at design time and add a few items to the application menu.
Expected: either the applied changes in the derived form should be serialized properly or the ribbon in the derived form should be locked for such changed.
Actual: even though the menu items are added in the designer and you can see them, after restarting the designer, they are not shown in the application menu anymore. You can see that they are still available in the Designer.cs but they are not added to the application menu. The same behavior is observed if you add tabs and groups with different elements.
Follow the steps:
1- Add RadRibbonBar1 to the form. The program compiles successfully.
2- Add RibbonTab1 to the RibbonBar. The program compiles successfully.
3. Add RadRibbonBarGroup1. The program does not compile and the mentioned error appears.
Error 1 Invalid Resx file. Could not load type System.DelegateSerializationHolder, Telerik.WinControls.UI, Version=2022.2.622.40, Culture=neutral, PublicKeyToken=5bb2a467cbec794e which is used in the .RESX file. Ensure that the necessary references have been added to your project. Line 142, position 5. C:\Projects\1570764TestRibbonResx\1570764TestRibbonResx\RadForm1.resx 142 5 1570764TestRibbonResx
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 Telerik Team,
i hope you can help us with an scaling Problem on submenues.
On highdpi mode the width of submenues on the application menues grows.
We tried some ways to fix the size on dropdownopened event.
More details in attached gif and project.
Hi Telerik Support,
Here is a description of the environment I work with:
- Visual Studio 2019 (version 16.9.3)
- NuGet package is UI.For.Winforms.AllControls.Net50 (v2021.1.326)
- Project is a .NET5.0 class library.
When trying to add a RadDropDownListElement to a RadRibbonBarGroup, Visual Studio seems to encounter an error and a window pops up with the message "The connection to the server has been lost". Adding other types of elements to the RadRibbonBarGroup seems to work properly (I managed to add buttons without any issues).
I will attach a screenshot of the issue.
Thanks for your help !
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
Please refer to the attached gif file for better illustration.
Workaround:
Private Sub RadGalleryElement_DropDownClosed(sender As Object, args As RadPopupClosedEventArgs)
For Each item As RadGalleryItem In Me.RadGalleryElement1.Items
item.VisualState = ""
Next
End Sub
By default, the ImagePrimitive in a ribbon button is auto sized. If you want to disable the AutoSize property of the image and specify a specific Size, the AutoSize property gets serialized in the designer, but the Size is not. This leads to missing image after reopening the designer.
After saving the changes and reopening the designer the image is missing since its Size property is not serialized:
Please refer to the attached gif file.
Note: the developer should be able to select a tab at design time and add groups and items to each tab. Currently, a different tab can't be selected.
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.
When I use the Crystal theme on the ribbonbar items disappear from the backstage view.
I found the same behavior on your demo also. So I'm giving you the steps to replicate the behavior there. When I switch to other themes the issue does not seem to happen.
Please let me know if I can provide any other information to help resolve this issue.
Thank you
Eddy