Themes and Ribborbar Start Button issues

4 posts, 1 answers
  1. Peter Szintai
    Peter Szintai avatar
    28 posts
    Member since:
    Jul 2009

    Posted 01 Sep 2011 Link to this post

    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
  2. Answer
    Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 06 Sep 2011 Link to this post

    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 >>

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Peter Szintai
    Peter Szintai avatar
    28 posts
    Member since:
    Jul 2009

    Posted 06 Sep 2011 Link to this post

    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
  5. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 12 Sep 2011 Link to this post

    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 >>

Back to Top