Hide Title bar

8 posts, 0 answers
  1. Rajkumar Chityal
    Rajkumar Chityal avatar
    5 posts
    Member since:
    Apr 2010

    Posted 13 Sep 2010 Link to this post

    Hi,
      Is there anyway to hide the title bar of the ribbonbar control?, I am using ribbon bar control in one of our views in our app, I do not want the title bar of showing up on that screen.

    Thanks,
    Raj.
  2. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 16 Sep 2010 Link to this post

    Hello Rajkumar Chityal,

    Thank you for writing. 

    Please consider the following code snippet in order to remove the title bar out of RadRibbonBar. Additionally, I have added two more lines of code which will allow you to remove the QuickAccessToolBar and the "Start" button in case you want to hide them as well:
    //remove the title bar
                radRibbonBar1.RibbonBarElement.Children[1].Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                //remove the quick access toolbar
                radRibbonBar1.RibbonBarElement.Children[0].Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                //remove the start button
                radRibbonBar1.RibbonBarElement.Children[3].Children[1].Children[1].Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

    I hope you find this information helpful. If there is anything else I can assist you, do not hesitate to contact me.
     
    Best wishes,
    Stefan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Aaron
    Aaron avatar
    12 posts
    Member since:
    Mar 2012

    Posted 21 May 2013 Link to this post

    It would be very helpful to add properties for removing those elements.
  5. Aaron
    Aaron avatar
    12 posts
    Member since:
    Mar 2012

    Posted 21 May 2013 Link to this post

    Actually, this code does not work for the 2013.1 version of the ribbon bar. The above lines appear to do nothing.

    Any other way to remove the objects?
  6. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 22 May 2013 Link to this post

    Hi Aaron,

    Here is the code you can use it the latest version and the properties you can use to access the elements mentioned:
    radRibbonBar1.RibbonBarElement.QuickAccessToolBar.Visibility = ElementVisibility.Collapsed;
    radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Visibility = ElementVisibility.Collapsed;
    radRibbonBar1.RibbonBarElement.RibbonCaption.Visibility = ElementVisibility.Collapsed;

    I hope that you find this useful.
     
    Regards,
    Stefan
    Telerik
    RadChart for WinForms is obsolete. Now what?
  7. Aaron
    Aaron avatar
    12 posts
    Member since:
    Mar 2012

    Posted 22 May 2013 Link to this post

    That did it. Thanks!
  8. D
    D avatar
    1 posts
    Member since:
    Jun 2013

    Posted 20 Jun 2013 Link to this post

    Hi,

    so I tried to collapse the QuickAccessToolBar and the RibbonCaption while using the Windows8 theme.
    The result looks kinda weird because the ApplicationButtonElement is placed below the tabs ... see screenshot.

    Regards,
    Philip

     

  9. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 25 Jun 2013 Link to this post

    Hello Philip,

    You have two options to resolve this case:
    1. Set the Visibility of the RibbonCaption to Hidden:
    radRibbonBar1.RibbonBarElement.RibbonCaption.Visibility = ElementVisibility.Hidden;

    or 
    2. Set the Top Margin of the ApplicationButtonElement to 0
    radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Margin = new Padding(
                    radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Margin.Left,
                    0,
                    radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Margin.Right,
                    radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Margin.Bottom)

    I hope this helps.
     

    Regards,
    Stefan
    Telerik
    RadChart for WinForms is obsolete. Now what?
Back to Top
UI for WinForms is Visual Studio 2017 Ready