Hide title in explorer view

6 posts, 1 answers
  1. Gérald
    Gérald avatar
    8 posts
    Member since:
    Dec 2010

    Posted 29 Aug 2011 Link to this post

    Hello,

    I'm using the RadPageView component with the "explorerBar" ViewMode.
    I'd like to hide the title bar which indicates the active page, but I didn't found any usefull property, nor any UI element in the Visual Style Builder.

    How should I do this ?

    Best regards
    Patrice
  2. Answer
    Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 01 Sep 2011 Link to this post

    Hello Gérald,

    Thank you for writing.

    You can hide this element using the following code snippet:

    RadPageViewExplorerBarElement explorerElement = this.radPageView1.ViewElement as RadPageViewExplorerBarElement;
    RadPageViewLabelElement labelElement = explorerElement.Children[1] as RadPageViewLabelElement;
    labelElement.Visibility = ElementVisibility.Collapsed;

    You have to do it in the form constructor in order for it to work.

    I hope this will help you. If you have further question, I would be glad to help. Best wishes,
    Ivan Petrov
    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. DevCraft banner
  4. Gérald
    Gérald avatar
    8 posts
    Member since:
    Dec 2010

    Posted 01 Sep 2011 Link to this post

    Works great, thanks..
  5. Jesica
    Jesica avatar
    2 posts
    Member since:
    Mar 2016

    Posted 02 Mar Link to this post

    Hello,

    I'm using the RadPageView component too but in my case with the "Strip" ViewMode.
    I'd need to hide One stripElement, but I didn't found any usefull property to di it. 

    How may I do it? Thanks

  6. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 03 Mar Link to this post

    Hi Jesica,

    The easiest way to do that is to remove the page from the Pages collection of the control:
    radPageView1.Pages.Remove(radPageViewPage1);

    If this does not work for you and you only want to hide the page tab, you can do it as follows.
    public void CollapsePage(RadPageViewPage page)
           {
               page.Item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
               //if you want to hide the page content as well, uncomment this
               //if (radPageView1.SelectedPage == page)
               //{
               //    radPageView1.SelectedPage = null;
               //}
           }

    Note that, even if you hide the tab, the page content will remain visible and if you want to hide it, you need to change the SelectedPage of the control to null or to another page instance.

    I hope that you find this information useful. 

    Regards,
    Stefan
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  7. Jesica
    Jesica avatar
    2 posts
    Member since:
    Mar 2016

    Posted 03 Mar in reply to Stefan Link to this post

    Excellent! 

    It's just that I need!!!

    Thanks you very much for your help!

    Muchas gracias por tu ayuda :-)!

Back to Top
DevCraft banner