Unplanned
Last Updated: 07 Sep 2022 20:11 by Curtis
Created by: Curtis
Comments: 4
Category: RibbonForm
Type: Bug Report
0

Steps to reproduce:

Create new Telerik Windows Forms Application ( I use VB.net but this crashes in C# as well )

Create RadRibbonForm - set the Project so this is the Startup Form.

Add Office2013LightTheme to form.

Set RadRibbonBar1.ThemeName to Office2013LightTheme.

Set ApplicationMenuStyle property = BackstageView

 

Run the ap, click on the Backstage tab and you'll see the first Image attached (called First.png)

 

Close the ap and back to Visual Studio - with the Form open in the Designer.

 

Everything is set but now i want to change the Background color of that lovely blue panel and everything inside it to a new background color.

I'd like to do this without creating a new Theme.

 

Click on the little triangle thingie in the upper right corner and select "Edit UI Elements"

Look down the Tree until you see BackstageItemsPanelElement.

Set BackstageItemsPanelElement.BackColor = 64, 53, 130

Close the Edit UI Elements dialog box and save then Start.  

Open the Backstage and you can see the "Back Button" at the very top still has the blue backcolor (No clue why this object doesnt get it's background from its Parent but it does not) so lets fix the background color for that button.

 

Close the Ap if its still running.  Open the form in VS Designer.  Edit UI Elements.  Look down until you find this:

RootRadElement.BackstageViewElement.BackstageItemsPanelElement.RadButtonElement.FillPrimitive

Set RadButtonElement.FillPrimitive.BackColor = 64, 53, 130

and we have to get the border - found under the RadButtonElement.BorderPrimative.FORECOLOR

Set RadButtonElement.BorderPrimative.ForeColor = 64, 53, 130

Close Element hierarchy editor.  Save and Run.

 

Everything looks great now right!??  Attached image #3 (Second.png)

If you examine form.designer.vb you will see these three lines have been added:

 

This is the BackstageItemsPanelElement.Backcolor we changed:

CType(Me.myBackStage.GetChildAt(0).GetChildAt(2), Telerik.WinControls.UI.BackstageItemsPanelElement).BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(53, Byte), Integer), CType(CType(130, Byte), Integer))

 

This is the Back Button's FillPrimitive we changed (NOTE Indexes 0, 2, 0, 0)

CType(Me.myBackStage.GetChildAt(0).GetChildAt(2).GetChildAt(0).GetChildAt(0), Telerik.WinControls.Primitives.FillPrimitive).BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(53, Byte), Integer), CType(CType(130, Byte), Integer))

 

And this is the Back Button's BorderPrimitive we changed (NOTE Indexes 0, 2, 0, 2)

CType(Me.myBackStage.GetChildAt(0).GetChildAt(2).GetChildAt(0).GetChildAt(2), Telerik.WinControls.Primitives.BorderPrimitive).ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(53, Byte), Integer), CType(CType(130, Byte), Integer))

 

And now to the CRASH.

Close the ap if still running. 

Open the form in Designer. 

Switch to Backstage. 

Click on the triangle thing again and this time Click on "Add Tab Item"

Save your form.

Close the form (Designer)

Now try to reload the form in the Designer.

 

CRASH!!!

You get a Dialog that i believe the Ribbon is throwing (Or more precisely the Backstage object) that says "Error parsing RadItem:  Children collection index is not valid: 0 - 2 - 0 - 0" - See attached image "Crash.png" - this is followed by another almost identical error dialog box except this one will say "0 - 2 - 0 - 2" 

 

Those three lines i posted above that were added to the form.Designer.vb code the first one is fine and has no issues.  The next two lines however are what's causing the problems (FillPrimitive and BorderPrimitive)

 

Any help anyone can offer would be very very appreciated at this time.  I've spent two days trying to work this out.  If there's no way to fix this can anyone suggest an alternate way for me to change those background colors without altering the Theme? 

 

Cheers all!

 

 

 

 

Completed
Last Updated: 29 Nov 2021 15:15 by ADMIN
Release R1 2022

Create a RadRibbonForm or a RadForm with Ribbon behavior. When you run the application and maximize the form, the titlebar's text disappears.

Workaround: Use a RadForm and add RadRibbonBar without Ribbon behavior. Then set the RadRibbonBar.RibbonBarElement.RibbonCaption.Visibility to Collapsed.

Workaround 2 : set the RadRibbonForm.AllowAero property to false

Unplanned
Last Updated: 17 May 2021 11:40 by ADMIN

Run the sample project and have a look at the gif file for illustrating the undesired behavior.

The issue is reproducible only when AllowAero = false.

Workaround:

        public RadRibbonForm1()
        {
            this.AllowAero = false;
            InitializeComponent();

            this.RootElement.Shape = new RoundRectShape(0);
        }

Unplanned
Last Updated: 08 Apr 2021 13:43 by ADMIN

We are designing our application at design time. All changes to the button elements are done in the designer. However, the ImagePrimitive.MinSize property gets reset after a new resource image is added.

Please refer to the attached gif file.

 

Declined
Last Updated: 13 Oct 2020 06:58 by ADMIN

Follow the steps:

1.Create an application and add a RadRibbonForm with name RadRibbonForm1.

2. Create a new class with name RadRibbonForm1.Test.cs and make it partial. It should look like a form.

3. Double click the new class. It will open the designer and some code will be generated in the class which prevents the application from building. The attached gif file with RadRibbonForm illustrates better the specific steps.