Problem adding RadDocumentPane to RadPaneGroup

3 posts, 0 answers
  1. C Bates
    C Bates avatar
    33 posts
    Member since:
    Oct 2009

    Posted 08 Jan 2010 Link to this post

    It seems multiple objects can't have the same name if they will be added to a Telerik collection.
    In our application, the content we added to the RadDockingPanes included a canvas, and the Canvas object was getting the same name for each pane.
        newCanvas.Name = CanvasName;
    When I removed that, it works as expected.

    Using the Q3 release.  In my xaml I have
        <docking:RadDocking x:Name="Docking" Grid.Row="1" > 
            <docking:RadSplitContainer x:Name="dockLeft" > 
                <docking:RadPaneGroup x:Name="toolsGroup" > 
                    <docking:RadPane IsPinned="False" IsHidden="False" CanDockInDocumentHost="False"
                                <!-- stuff --> 
                    <docking:RadPane IsPinned="False" IsHidden="False" CanDockInDocumentHost="False" CanUserClose="False"
                <docking:RadSplitContainer x:Name="splitContainer1"
                    <docking:RadPaneGroup x:Name="mapGroup" > 
                    <docking:RadPaneGroup x:Name="rightMapGroup"
    In code I try to add RadDocumentPanes.
                RadDocumentPane newPane = new RadDocumentPane(); 
                newPane.Header = new TextBlock() { 
                    Text = "Header" 
                newPane.Content = new TextBlock() { 
                    Text = "Content" 
                newPane.CanFloat = false
                newPane.CanDockInDocumentHost = false
                newPane.CanUserClose = false

    For the simple content shown above, this works as expected, for as many panes as I want to add.
    However, with more complicated content:
    -- Grid
    ---- StackPanel
    ---- Canvas
    ---- ScrollViewer
    ---------- Canvas
    ---------- Slider
    The first pane adds as expected, but trying to add a second pane throws this exception:
    Value does not fall within the expected range.

    What am I doing wrong?
    (mapGroup.AddItem(newPane, DockPosition.Left)  works as expected, but that is not what I want.)

    Thanks for the help...

  2. C Bates
    C Bates avatar
    33 posts
    Member since:
    Oct 2009

    Posted 10 Jan 2010 Link to this post

    Solution is in UPDATE in original post.
    (I was looking for the option to mark this question as answered...)
  3. DevCraft R3 2016 release webinar banner
  4. Edward
    Edward avatar
    2 posts
    Member since:
    Jun 2010

    Posted 06 Jul 2010 Link to this post

    Is this being done in code behind? 

    If this was done in a viewmodel then how would you get a reference for the RadPaneGroup element -- mapGroup? 
Back to Top