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

Dock RadPane at center

4 Answers 119 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Bipin
Top achievements
Rank 1
Bipin asked on 20 Aug 2013, 04:01 PM
Hi,
I am adding radpane dynamically into radpanegroup.

<telerik:RadSplitContainer AllowDrop="True"  x:Name="radSplitContainer" Background="Transparent" Width="{Binding  Source={StaticResource  TrendsRadPaneWidth}, Converter={StaticResource AppConverter}}">
                    <telerik:RadPaneGroup x:Name="radPaneGroup2" Background="Transparent" PreviewSelectionChanged="radPaneGroup_PreviewSelectionChanged_1">

                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>


code -
            Dim pane1 As New RadPane()
            pane1.Header = window.InputTextBlock.Text
            Dim userControl As New RadPaneUserControl()
            pane1.Content = userControl
            pane1.Visibility = Visibility.Visible

            'pane1.TabNavigation = KeyboardNavigationMode.Local
            pane1.MakeDockable()
            radPaneGroup2.Items.Add(pane1)


 Please check withoutDocked.png image. You will see the radpane is not positioned and even header hane is blank (*not applied)
I want to dock the radpane at center when i add it from backend.

it is working in case of RadDocking.DocumentHost.  Please check attached image dockedAtCenter.png
But i want radpane docked at center using RadSplitContainer.

Please let me know how to dock radpane at center while adding dynamically?

Thanks
Bipin

4 Answers, 1 is accepted

Sort by
0
Bipin
Top achievements
Rank 1
answered on 20 Aug 2013, 04:16 PM
Hi
Even i have tried following but not working
            Dim pane1 As New RadPane()
            pane1.Header = window.InputTextBlock.Text
            Dim userControl As New RadPaneUserControl()
            pane1.Content = userControl
            pane1.MakeDockable()
            radPaneGroup2.AddItem(pane1, DockPosition.Center)

Any help?

Bipin
0
Georgi
Telerik team
answered on 23 Aug 2013, 09:04 AM
Hi Bipin,

Usually the Document host is designed to hold Panes that are placed in the center. So can you let us know why you want to use a Pane without the Document host as there might be a way of providing what you need with the document host. I am attaching project showing how you can modify the Document host so it does not have the tabs on top.
So it depends on the configuration of the Dock you have, but usually if you wan to add Pane in the center you may work around it by adding a Split Container with InitialPosition  docked left and change its size in order to fit the screen, add a PaneGroup to it and then add the desired Pane in the PaneGroup.
Unfortunately  we can not be more specific as we are not familiar with the configuration of the dock you have and your exact specifications. So maybe it would help if you can send us a simple application of a dock and what you have tried in order to get the Pane in the center.

Regards,
Georgi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Bipin
Top achievements
Rank 1
answered on 23 Aug 2013, 09:32 AM
Hi
I have only one radpanegroup in RadSplitContainer. I am adding radpane into that radpanegroup.
And for each radpane I have customized context menu for radpane. For eg. (Close this window, Close All But this, Rename Tab)
On context menu click, i have written backend code which requires (*activepane ) from raddocking control.
Also in some cases i require to loop through collection of panes. Please see below code.

Private Sub RadMenuItem_CloseAllButThis_Click(sender As Object, e As Telerik.Windows.RadRoutedEventArgs)
     Dim activeRadPane As RadPane = Me.XamlMainDocker.ActivePane
          For Each pane As RadPane In XamlMainDocker.Panes
          Next
End Sub


I am using toolwindow if the radpane is in floating position.
Dim toolWindow As ToolWindow = pane.ParentOfType(Of ToolWindow)()

Also I have tab switcher feature to change the selected tab (similar to visual studio, switch between pages).

I need active pane and collection of panes from the documenthost to implement the above features.
how to achieve using document host ??

**Above features are not working if i use Document Host instead of RadSplitContainer.

Thanks
Bipin
0
Vladi
Telerik team
answered on 28 Aug 2013, 08:30 AM
Hello,

If the desired behavior of the Docked Panes in the control when not using a DocumentHost is for them to be stretched tot he full size of the RadDocking control you need to simply set the HasDocumentHost of the control to False. In order to remove the header of a Pane in this scenario you could set the PaneHeaderVisibility to collapsed. The next code snippet shows the previously mentioned approach:
<telerik:RadDocking HasDocumentHost="False">
    <telerik:RadSplitContainer>
        <telerik:RadPaneGroup>
            <telerik:RadPane Header="Pane 1" PaneHeaderVisibility="Collapsed"/>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking>

Hope this is helpful.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Docking
Asked by
Bipin
Top achievements
Rank 1
Answers by
Bipin
Top achievements
Rank 1
Georgi
Telerik team
Vladi
Telerik team
Share this question
or