How to remove header and border from DocumentPane

4 posts, 0 answers
  1. Peter
    Peter avatar
    10 posts
    Member since:
    Feb 2015

    Posted 30 Mar 2015 Link to this post

    We use RadDocking in our application to show a taskbar on the left and a work area on the right. The XAML for the shell looks like this.

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        
    <ContentControl Grid.Row="0"
                        prism:RegionManager.RegionName="{x:Static pll:RegionNames.BannerRegion}"
                        VerticalAlignment="Top" />
     
        <telerikDocking:RadDocking Grid.Row="1"
                                   Margin="2">
     
            <telerikDocking:RadSplitContainer Orientation="Vertical"
                                              InitialPosition="DockedLeft"
                                              MinWidth="300">
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadPane CanUserClose="False"
                                            CanFloat="False"
                                            Header="{x:Static resources:Resources.TaskBarPaneHeaderText}"
                                            ContextMenuTemplate="{x:Null}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
     
                            <ContentControl Grid.Row="0"
                                            prism:RegionManager.RegionName="{x:Static pll:RegionNames.TaskBarRegion}" />
     
                            <ContentControl Grid.Row="1"
                                            VerticalAlignment="Bottom"
                                            HorizontalAlignment="Left"
                                            Height="300"
                                            Width="400"
                                            prism:RegionManager.RegionName="{x:Static pll:RegionNames.FooterRegion}" />
                        </Grid>
                    </telerikDocking:RadPane>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>
     
            <telerikDocking:RadDocking.DocumentHost>
                <telerikDocking:RadSplitContainer>
                    <telerikDocking:RadPaneGroup>
                        <telerik:RadDocumentPane CanUserPin="False"
                                                 CanUserClose="False"
                                                 CanFloat="False"
                                                 PaneHeaderVisibility="Hidden"
                                                 TitleTemplate="{x:Null}"
                                                 ContextMenuTemplate="{x:Null}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <ContentControl Grid.Row="0"
                                                Margin="2,2,2,2"
                                                prism:RegionManager.RegionName="{x:Static pll:RegionNames.MenuBarRegion}" />
     
                                <ContentControl Grid.Row="1"
                                                Margin="2,2,2,6"
                                                prism:RegionManager.RegionName="{x:Static pll:RegionNames.BreadCrumbRegion}" />
     
                                <ContentControl Grid.Row="2"
                                                Margin="2,2,2,2"
                                                prism:RegionManager.RegionName="{x:Static pll:RegionNames.WorkSpaceRegion}" />
                            </Grid>
                        </telerik:RadDocumentPane>
                    </telerikDocking:RadPaneGroup>
                </telerikDocking:RadSplitContainer>
            </telerikDocking:RadDocking.DocumentHost>
     
        </telerikDocking:RadDocking>
    </Grid>

    In the attached screenshot there appears to be an empty header on the document pane and a thick blue border (blue because of the Telerik Windows8 Theme we use). I have marked them both with a red square.

    How can I get rid of them? I don't want the border and the header to be displayed.

    Regards,
    Peter



  2. Peter
    Peter avatar
    10 posts
    Member since:
    Feb 2015

    Posted 30 Mar 2015 Link to this post

    I found some extra info in another forum post which made me lose the thick border.

    http://www.telerik.com/forums/auto-resize-of-radpane-inside-a-raddocking-radsplitcontainer-and-radpanegroup

    I know use HasDocumentHost=False on the RadDocking Element. I also removed RadDocking.DocumentHost from the XAML.

    The only thing left is to remove the empty header from a Radpane. How to do this?

    Regards,
    Peter
  3. UI for WPF is Visual Studio 2017 Ready
  4. Peter
    Peter avatar
    10 posts
    Member since:
    Feb 2015

    Posted 30 Mar 2015 Link to this post

    And found out how to remove the header in

    http://docs.telerik.com/devtools/wpf/controls/raddocking/how-to/remove-the-header-of-the-radpane.html

    I used PaneHeaderVisibility=Hidden where it should be Collapsed.

    So problem solved :)
  5. Peter
    Peter avatar
    10 posts
    Member since:
    Feb 2015

    Posted 30 Mar 2015 Link to this post

    The resulting XAML in case it could help anyone else.

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
     
        <ContentControl Grid.Row="0"
                        prism:RegionManager.RegionName="{x:Static pll:RegionNames.BannerRegion}"
                        VerticalAlignment="Top" />
     
        <telerikDocking:RadDocking Grid.Row="1"
                                   Margin="2"
                                   HasDocumentHost="False">
     
            <telerikDocking:RadSplitContainer Orientation="Vertical"
                                              InitialPosition="DockedLeft"
                                              MinWidth="300">
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadPane CanUserClose="False"
                                            CanFloat="False"
                                            Header="{x:Static resources:Resources.TaskBarPaneHeaderText}"
                                            ContextMenuTemplate="{x:Null}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
     
                            <ContentControl Grid.Row="0"
                                            prism:RegionManager.RegionName="{x:Static pll:RegionNames.TaskBarRegion}" />
     
                            <ContentControl Grid.Row="1"
                                            VerticalAlignment="Bottom"
                                            HorizontalAlignment="Left"
                                            Height="300"
                                            Width="400"
                                            prism:RegionManager.RegionName="{x:Static pll:RegionNames.FooterRegion}" />
                        </Grid>
                    </telerikDocking:RadPane>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>
     
                <telerikDocking:RadSplitContainer>
                    <telerikDocking:RadPaneGroup>
                        <telerik:RadPane CanUserPin="False"
                                         CanUserClose="False"
                                         CanFloat="False"
                                         PaneHeaderVisibility="Collapsed"
                                         TitleTemplate="{x:Null}"
                                         ContextMenuTemplate="{x:Null}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <ContentControl Grid.Row="0"
                                                Margin="2,2,2,2"
                                                prism:RegionManager.RegionName="{x:Static pll:RegionNames.MenuBarRegion}" />
     
                                <ContentControl Grid.Row="1"
                                                Margin="2,2,2,6"
                                                prism:RegionManager.RegionName="{x:Static pll:RegionNames.BreadCrumbRegion}" />
     
                                <ContentControl Grid.Row="2"
                                                Margin="2,2,2,2"
                                                prism:RegionManager.RegionName="{x:Static pll:RegionNames.WorkSpaceRegion}" />
                            </Grid>
                        </telerik:RadPane>
                    </telerikDocking:RadPaneGroup>
                </telerikDocking:RadSplitContainer>
     
        </telerikDocking:RadDocking>
    </Grid>

    Regards,
    Peter
Back to Top