Cannot use RadDock inside Tab Control

10 posts, 0 answers
  1. xav
    xav avatar
    15 posts
    Member since:
    Jul 2006

    Posted 03 Jun 2010 Link to this post

    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>


  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 03 Jun 2010 Link to this post

    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.
  3. DevCraft banner
  4. xav
    xav avatar
    15 posts
    Member since:
    Jul 2006

    Posted 03 Jun 2010 Link to this post

    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




  5. xav
    xav avatar
    15 posts
    Member since:
    Jul 2006

    Posted 03 Jun 2010 Link to this post

    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
  6. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 09 Jun 2010 Link to this post

    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.
  7. xav
    xav avatar
    15 posts
    Member since:
    Jul 2006

    Posted 09 Jun 2010 Link to this post

    Thanks for looking further Miroslav. Much appreciated.
     -- xavier
  8. jean-Marc
    jean-Marc avatar
    22 posts
    Member since:
    Jun 2010

    Posted 12 Oct 2010 Link to this post

    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
  9. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 18 Oct 2010 Link to this post

    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
  10. sanjay srivastava
    sanjay  srivastava avatar
    1 posts
    Member since:
    Apr 2010

    Posted 23 Sep 2011 Link to this post

    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
  11. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 27 Sep 2011 Link to this post

    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 >>

Back to Top
DevCraft banner