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

RadDocument - Hide Header/Title

3 Answers 121 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Thorsten
Top achievements
Rank 1
Thorsten asked on 05 Sep 2014, 12:58 PM
Hi,

i'm looking for a way to hide the RadDocumentPane headers within the document host under certain conditions.
e.g. for applications that only contain a single document.
I tried to set the 'RadDocumentPane.PaneHeaderVisibilityProperty' to 'Collapsed' in this case, but without any effects.

Is there any way to control the visibility of the RadDocument-Host's title bar ?

3 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 08 Sep 2014, 11:52 AM
Hi Thorsten,

Thank you for contacting us.

In order to achieve the desired you would need to extract and modify the PaneGroupDocumentTemplate. In the template you will have to find the Grid named Header and remove it. For your convenience I have prepared and attached a sample project which demonstrates the exact approach (note that I have used Implicit Styles).

Hope this will help you to achieve the desired.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Thorsten
Top achievements
Rank 1
answered on 09 Sep 2014, 08:12 AM
Hi,

thanks for the sample, it pointed me to the right direction.

I switched to a less template-invasive solution via a custom pane group by hooking up to the Loaded-Event: 
private FrameworkElement FindDocumentHostHeader( )
{
    var header = this.ChildrenOfType<Panel>( ).FirstOrDefault( g => g.Name == "ItemsContainer" );
    return header;
}

private void CustomRadPaneGroup_Loaded( object sender, RoutedEventArgs e )
{
     if ( this.IsInDocumentHost )
     {
         this._documentHostHeader = this.FindDocumentHostHeader( this );
         if (this._documentHostHeader != null)
             this._documentHostHeader.Visibility = Visibility.Collapsed;
     }
 }
0
Kalin
Telerik team
answered on 09 Sep 2014, 12:47 PM
Hello Thorsten,

I'm glad it helped and I would also like to thank for the sharing your solution. If you have any further questions or concerns let us know.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Docking
Asked by
Thorsten
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Thorsten
Top achievements
Rank 1
Share this question
or