RadPaneGroup.AddItem not show content

6 posts, 0 answers
  1. Yarlen
    Yarlen avatar
    3 posts
    Member since:
    Jun 2011

    Posted 03 Jun 2011 Link to this post

    Hello,
    If I add items to a RadPaneGroup using this.MyPaneGrtoup.Items.Add(MyNewControl); the content is shows well, but if I use

     

     

    this.MyPaneGrtoup.AddItem(MyNewControl, DockPosition.Left);, the content is not showing and appears a white Panel instead.

    What ca I do to define and change the Dockposition programatically.

    Thanks

     

  2. arthurd
    arthurd avatar
    18 posts
    Member since:
    Aug 2007

    Posted 05 Jun 2011 Link to this post

    This sounds very much like an issue I reported (which has been marked as a bug).

    Does clicking on the tab of the pane or dragging it around to a different docking position make the contents visible? It did for me. I am looking for a work-around myself. It has something to do with the RadTabControl's visibility of its content.
  3. DevCraft banner
  4. Yarlen
    Yarlen avatar
    3 posts
    Member since:
    Jun 2011

    Posted 07 Jun 2011 Link to this post

    Hello,
    No the content not appears after click on the tab or  or dragging it around to a different docking position.
    Thanks
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 08 Jun 2011 Link to this post

    Hello Yarlen,

     What is the type of the object MyNewControl? It needs to be a RadPane or to inherits from RadPane in order to work. One more thing you should notice - as this method (AddItem) is using the parent SplitContainer of the group it will not work if the group is not placed in a SplitContainer which is placed in the Docking control. That means that you shouldn't use it with groups you just created.

    Here is an example that works fine:

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
     
        <Button VerticalAlignment="Top" HorizontalAlignment="Stretch" Click="Button_Click" Content="Add pane" />
     
        <telerik:RadDocking Grid.Row="1">
            <telerik:RadSplitContainer>
                <telerik:RadPaneGroup x:Name="group">
                    <telerik:RadPane />
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Grid>

    And the handler of the Button's Click event:
    private void Button_Click(object sender, RoutedEventArgs e)
    {
        group.AddItem(new RadPane { Header = "Some pane" }, DockPosition.Left);
    }

    Greetings,
    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
  6. Yarlen
    Yarlen avatar
    3 posts
    Member since:
    Jun 2011

    Posted 08 Jun 2011 Link to this post

    Hello Miroslav,
    This is my "Not Working Code":

      RadPane imagePanel = new RadPane();

                var imageContent = new ImageContainer(e.JpgURL);
                var toolbox = new ImageToolbox(e.JpgURL, imageContent);


                imageContent.ToolBox = toolbox;
                imagePanel.Content = imageContent;
                imagePanel.Title = e.imageNumber;

                this.OpenedImages.AddItem(imagePanel, DockPosition.Left);

    where imagePanel  is a RadPane, and OpenedImages is a RadPaneGroup, like you say, but not works
    Thanks!
  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 09 Jun 2011 Link to this post

    Hello Yarlen,

     I couldn't reproduce the problem. Could you please refer to the attached project and let me know if I'm missing something.

    Kind regards,
    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
Back to Top
DevCraft banner