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

Cannot use RadDock inside Tab Control

9 Answers 185 Views
Docking
This is a migrated thread and some comments may be shown as answers.
xav
Top achievements
Rank 1
xav asked on 03 Jun 2010, 05:36 PM
There is not much to the application I'm creating. Basically a RadDocking control in a user control what is being consumed into the content of a tab control. I get the following error, any ideas?

Webpage error details

Message: Unhandled Error in Silverlight Application
Code: 4004    
Category: ManagedRuntimeError       
Message: System.InvalidOperationException: UIElement.Arrange(finalRect) cannot be called with Infinite or NaN values in finalRect.
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at Telerik.Windows.Controls.Primitives.TabStripPanel.ArrangeOverride(Size finalSize)
   at System.Windows.FrameworkElement.ArrangeOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)     

If I remove the docking stuff and replace it with a label, all is fine. here is the definition of my user control:

<UserControl x:Class="CODYRecords.Views.MainNamesControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:VIEWS="clr-namespace:CODYRecords.Views"   
    xmlns:uc="clr-namespace:CODYRecords.Names"                
    mc:Ignorable="d" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:my="clr-namespace:CODY.ObjectModel;assembly=CODY.ObjectModel" Loaded="UserControl_Loaded" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" d:DesignHeight="372" d:DesignWidth="845">
    <UserControl.DataContext>
        <VIEWS:NamesViewModel />
    </UserControl.DataContext>
    <Grid x:Name="LayoutRoot" Background="White" UseLayoutRounding="False" Height="371.964" Width="844.968">
        <telerik:RadDocking HorizontalAlignment="Stretch" Name="radDocking1" VerticalAlignment="Stretch" HasDocumentHost="true">

            <telerik:RadSplitContainer InitialPosition="DockedRight" Height="Auto" Name="rsplRight" >
                <telerik:RadPaneGroup TabStripPlacement="Right" Name="rpgRight">
                    <telerik:RadPane Header="Image" Name="rpnRight" Visibility="Collapsed"></telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>

            <telerik:RadSplitContainer InitialPosition="DockedTop" Height="Auto">
                <telerik:RadPaneGroup SelectedIndex="-1" TabStripPlacement="Bottom" Align="Left" Height="Auto" VerticalAlignment="Top" Width="Auto">
                    <telerik:RadPane Header="Selected Name" Name="SelectedName" >

                        <!-- <uc:ucNameData Height="469.953"></uc:ucNameData> -->
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>

            <telerik:RadSplitContainer InitialPosition="DockedBottom" Width="Auto" Height="Auto" MinHeight="0" MinWidth="0">
                <telerik:RadPaneGroup SelectedIndex="0" TabStripPlacement="Top" TabOrientation="Horizontal" Height="Auto">
                    <telerik:RadPane Header="Full list" />
                    <telerik:RadPane Header="Itentifiers" />
                    <telerik:RadPane Header="Incidents" />
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>

        </telerik:RadDocking>
    </Grid>
</UserControl>


9 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 03 Jun 2010, 05:52 PM
Hello Xav,

 As the exception says you cannot place the Docking control inside a control or panel that would measure it with infinite width or height. This could be a StackPanel, an Auto row or column of a Grid, ScrollViewer or something like this. You could work-this-around setting a Width and Height to the Docking control.

Best wishes,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
xav
Top achievements
Rank 1
answered on 03 Jun 2010, 06:08 PM
Miroslav, I followed your suggestion, so now I have:

        <telerik:RadDocking Name="radDocking1" Width="900" Height="760">

but that didn't help. Do I need to so the same for all sub controls like the RadSplitContainers? 

Thanks for your quick response

-- xavier




0
xav
Top achievements
Rank 1
answered on 03 Jun 2010, 08:19 PM
Miroslav,
  Setting the Height/Width properties on all RadSplitContainers eliminated the error- thanks!

  Can you recommend an approach to prevent my screen from being a static size? I'd like it to conform to the browser.

 -- xavier
0
Miroslav Nedyalkov
Telerik team
answered on 09 Jun 2010, 08:46 AM
Hi Xav,

 The problem seems to be different than what I suspected. I tried your code at my side and found out that setting the TabStripPlacement property causes the problem. Once I removed its setters the problem was fixed.

Best wishes,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
xav
Top achievements
Rank 1
answered on 09 Jun 2010, 12:55 PM
Thanks for looking further Miroslav. Much appreciated.
 -- xavier
0
jean-Marc
Top achievements
Rank 1
answered on 13 Oct 2010, 01:19 AM
Hi guys,
I know this thread is quite old already but thought sharing this would be of some interest.

My scenario was pretty similar of Xav's one as I embedded a RadTabControl into a RadPaneGroup.
I faced similar issue ...
Quite similar actually as I didn't have any runtime unhandled error but my Tabs simply didn't worked. they just highlight without releasing selection of previous tab.

I followed Miroslav's advice and got rid of my TabStripPlacement in the xaml, now seems to work fine...funny thing is that if I set that TabStripPlacement in the code behind (which I need to as want to give some liberty to my end user to customize his page) it's also working ...

Now question is did you find a permanent fix for this? Would be curious to know to understand this bug but right now don't have much time to investigate more ...

thanks anyway
Regards
Jim
0
Miro Miroslavov
Telerik team
answered on 18 Oct 2010, 04:19 PM
Hi jean-Marc,

 We believe that the problem is due to the fact that TabStripPlacement is done using the LayoutTransform control and it gets messed in some sophisticated scenarios with RadDocking. It also has some flows with the Selection mechanism of both. We have this logged into our system and should fix it, but at the moment I can't give you exact date.
Sorry for any inconvenience. 

All the best,
Miro Miroslavov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sanjay srivastava
Top achievements
Rank 1
answered on 23 Sep 2011, 08:23 PM
Hello dear,

I am using simple ajax tab control and within tab control i used contant tamplate but my concern i want used raddock control used for that contant tamplate.

how can i used.

Thanks
0
Miroslav Nedyalkov
Telerik team
answered on 27 Sep 2011, 09:17 AM
Hi Sanjay,

 Could you please give us some more details about your requirement as I don't fully understand what you question is?

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Docking
Asked by
xav
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
xav
Top achievements
Rank 1
jean-Marc
Top achievements
Rank 1
Miro Miroslavov
Telerik team
sanjay srivastava
Top achievements
Rank 1
Share this question
or