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

How to remove header and border from DocumentPane

3 Answers 356 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 30 Mar 2015, 01:18 PM
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



3 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 30 Mar 2015, 02:08 PM
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
0
Peter
Top achievements
Rank 1
answered on 30 Mar 2015, 02:14 PM
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 :)
0
Peter
Top achievements
Rank 1
answered on 30 Mar 2015, 02:19 PM
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
Tags
Docking
Asked by
Peter
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Share this question
or