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

Hide title in explorer view

5 Answers 229 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Gérald
Top achievements
Rank 2
Gérald asked on 29 Aug 2011, 12:48 PM
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

5 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Petrov
Telerik team
answered on 01 Sep 2011, 08:01 AM
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 >>

0
Gérald
Top achievements
Rank 2
answered on 01 Sep 2011, 04:49 PM
Works great, thanks..
0
Jesica
Top achievements
Rank 1
answered on 02 Mar 2016, 04:39 PM

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

0
Stefan
Telerik team
answered on 03 Mar 2016, 07:37 AM
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
0
Jesica
Top achievements
Rank 1
answered on 03 Mar 2016, 03:09 PM

Excellent! 

It's just that I need!!!

Thanks you very much for your help!

Muchas gracias por tu ayuda :-)!

Tags
PageView
Asked by
Gérald
Top achievements
Rank 2
Answers by
Ivan Petrov
Telerik team
Gérald
Top achievements
Rank 2
Jesica
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or