RadDocument - Hide Header/Title

4 posts, 0 answers
  1. Thorsten
    Thorsten avatar
    26 posts
    Member since:
    Apr 2010

    Posted 05 Sep 2014 Link to this post

    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 ?
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 08 Sep 2014 Link to this post

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Thorsten
    Thorsten avatar
    26 posts
    Member since:
    Apr 2010

    Posted 09 Sep 2014 in reply to Kalin Link to this post

    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;
         }
     }
  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 09 Sep 2014 Link to this post

    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.
     
Back to Top