This is a migrated thread and some comments may be shown as answers.

Themes and Ribborbar Start Button issues

3 Answers 131 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Peter Szintai
Top achievements
Rank 1
Peter Szintai asked on 01 Sep 2011, 04:56 PM
Hi All,

Our application is a MDI winforms application with Ribbonbar. During runtime the user can choose from the built-in themes (we don't use custom themes made with the Visual Style Builder).

Some theme looks good (e.g.: ControlDefault, Breeze, Office2007... etc.), but in the case of the Office2010..., Windows7 and TelerikMango themes we have issues with the Start Button. (see the attached picture):
  • the Start Button slips down, and hides a part of the ribbonbar tab
  • there is an additional rectangle behind the image of the Start button
  • in the case of the TelerikMetro theme the rectangle contains a Telerik logo and a down arrow.

How can I move up the Start button and hide the background rectangle?


Best regards,

Peter

3 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 06 Sep 2011, 08:27 AM
Hello Peter,

Thank you for writing.

The observed behavior is the desired one for those themes. The button size is set and when you set bigger image, it is being misplaced. You have two options to fix this, either when those themes are used, set a smaller image that will fit in the button, or, change the themes settings for that button (by using Visual Style Builder), to match the ControlDefault theme settings for example in order to have the circular button shape. If you decide to go with the themes modification and you experience any difficulties achieving the desired look and feel, please let me know which themes you find difficult to modify, and how should they look, so I can point you to the right direction.

I hope that you find this information helpful. If there is anything else I can assist you with, do not hesitate to write back.
 
Kind regards,
Stefan
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Peter Szintai
Top achievements
Rank 1
answered on 06 Sep 2011, 09:06 PM
Hi Stefan,

your answer about the image size gave me an idea, maybe I have to investigate the radribbonbar UI elements, I think, I have found the solution:

the ActionButtonElement.FillPrimitive.Visibility controls the visibility of the button behind the image,
the RadApplicationMenuButtonElement.PositionOffset says the position, a negative Y value moves up the image.

((Telerik.WinControls.UI.RadApplicationMenuButtonElement)(this.radRibbonBar1.GetChildAt(0).GetChildAt(3))).PositionOffset = new System.Drawing.SizeF(0F, -5F);
((Telerik.WinControls.Primitives.FillPrimitive)(this.radRibbonBar1.GetChildAt(0).GetChildAt(3).GetChildAt(1).GetChildAt(1).GetChildAt(0))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;


Regards,

Peter
0
Stefan
Telerik team
answered on 12 Sep 2011, 11:49 AM
Hello Peter,

The Visibility property of ActionButtonElement.FillPrimitive controls the visibility of the FillPrimitive element of the button. The PositionOffset property moves the button position. 

You can find more information regarding Telerik Presentation Framework in this help section: 
http://www.telerik.com/help/winforms/tpf-overview.html.

Please let me know if I can be of further assistance.
 
Greetings,
Stefan
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Themes and Visual Style Builder
Asked by
Peter Szintai
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Peter Szintai
Top achievements
Rank 1
Share this question
or