Document Host Tab Header

5 posts, 1 answers
  1. Deven
    Deven avatar
    33 posts
    Member since:
    Apr 2009

    Posted 26 May 2010 Link to this post

    I have an application which is using Tab control extensively. The document host also shows up as Tab. I know it is to support multiple documents. however in our case we ahve just one document and I would like to get rid of the tab header, so that it does not look like a tab. Is there a way I can achieve this? Otherwise I would like to extend the header in a way that it takes the full width of the document, is this possible?

    Thanks
    Deven
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 27 May 2010 Link to this post

    Hello Deven,

    Thank you for contacting us.

    To remove the header of a Pane in the DocumentHost you will have to set the Visibility property of the Pane to Collapsed.

    If you need further assistance please let us know.

    Kind regards,
    Konstantina
    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. DevCraft banner
  4. Deven
    Deven avatar
    33 posts
    Member since:
    Apr 2009

    Posted 27 May 2010 Link to this post

    I am using Prism. The main panel is where all the pages are loaded.
    <radDock:RadSplitContainer> 
                    <radDock:RadPaneGroup> 
                        <radDock:RadPane   
                            x:Name="mainPanel" 
                            Header="{Binding Title}" 
                            CanUserClose="False" 
                            CanUserPin="False" 
                            CanFloat="False">  
                            <Grid> 
                                <ContentControl  
                                    x:Name="mainContent" 
                                    HorizontalContentAlignment="Stretch" 
                                    VerticalContentAlignment="Stretch" 
                                    rgn:RegionManager.RegionName="ShellRegion_MainRegion"/>  
                            </Grid> 
                        </radDock:RadPane> 
                    </radDock:RadPaneGroup> 
    On load of Shell, this panel is moved to Document Host.
    public Shell(IUnityContainer container,  
                ShellViewModel model)  
            {  
                this.container = container;  
                this.model = model;  
                InitializeComponent();  
                //register the region holder so navigation can resolve it  
                container.RegisterInstance<ContentControl>(  
                    ShellConstants.ShellRegion_MainRegion,mainContent);  
     
                this.Loaded += (s, e) => 
                    {  
                        this.DataContext = model;  
                        mainPanel.MoveToDocumentHost();  
                    };  
            } 

    Which results in to (see attachment). I would like to hide the higlighted header. I tried setting Panel header visibility of the main panel, but that did not work.

    Thanks
    Deven
  5. Deven
    Deven avatar
    33 posts
    Member since:
    Apr 2009

    Posted 27 May 2010 Link to this post

    Sorry missed the attachment. Actually the attachment facility is not working properly.
  6. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 31 May 2010 Link to this post

    Hi Deven,

    Thank you for the code snippets.

    To remove the Tab from the DocumentPane you will have to set the Visibility property of the DocumentPane to Collapsed. For example, like so:

    public Shell(IUnityContainer container,   
                ShellViewModel model)   
            {   
                this.container = container;   
                this.model = model;   
                InitializeComponent();   
                //register the region holder so navigation can resolve it   
                container.RegisterInstance<ContentControl>(   
                    ShellConstants.ShellRegion_MainRegion,mainContent);   
        
                this.Loaded += (s, e) =>  
                    {   
                        this.DataContext = model;   
                        mainPanel.MoveToDocumentHost();  
                        mainPanel.Visibility = System.Windows.Visibility.Collapsed;  
                    };   
            }  

    Hope this helps.

    If you have further questions please let us know.

    Regards,
    Konstantina
    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.
Back to Top
DevCraft banner