Changing visibility of richRibbonBar Tab

2 posts, 0 answers
  1. Karl
    Karl avatar
    226 posts
    Member since:
    Jun 2005

    Posted 10 Aug 2011 Link to this post

    Hi,

    It seems to me that changing the visibility of a richRibbonBar Tab is not working.

    ie:
    richRibbonBar1.ShowHomeTab = false;
    richRibbonBar1.ShowInsertTab = false;  // ...etc
    The tabs still stay visible.

    Could you check this out?
    Thank you,
    Karl
  2. Stefan
    Admin
    Stefan avatar
    2898 posts

    Posted 11 Aug 2011 Link to this post

    Hi Karl,

    Thank you for writing.

    Indeed this property does not work, because it does not contain implementation. However, you can easily implement the desired property in RichRibbonBar project. Here is an example, on how to achieve this for the home tab:
    [DefaultValue(true)]
           public bool ShowHomeTab
           {
               get
               {
                   if (this.tabHome.Visibility == ElementVisibility.Visible)
                   {
                       return true;
                   }
                   else
                   {
                       return false;
                   }
               }
               set
               {
                   if (value == true)
                   {
                       this.tabHome.Visibility = ElementVisibility.Visible;
                   }
                   else
                   {
                       this.tabHome.Visibility = ElementVisibility.Collapsed;
                   }
               }
           }

    I hope you find this information helpful. We will consider adding implementation for these properties in the online version of the projects.

    Should you have any other questions, do not hesitate to contact us. 

    Regards,
    Stefan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top