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

RadPaneGroup.AddItem not show content

5 Answers 116 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Yarlen
Top achievements
Rank 1
Yarlen asked on 03 Jun 2011, 06:07 PM
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

 

5 Answers, 1 is accepted

Sort by
0
arthurd
Top achievements
Rank 1
answered on 05 Jun 2011, 07:52 PM
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.
0
Yarlen
Top achievements
Rank 1
answered on 07 Jun 2011, 03:02 PM
Hello,
No the content not appears after click on the tab or  or dragging it around to a different docking position.
Thanks
0
Miroslav Nedyalkov
Telerik team
answered on 08 Jun 2011, 08:19 AM
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
0
Yarlen
Top achievements
Rank 1
answered on 08 Jun 2011, 08:43 PM
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!
0
Miroslav Nedyalkov
Telerik team
answered on 09 Jun 2011, 08:47 AM
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
Tags
Docking
Asked by
Yarlen
Top achievements
Rank 1
Answers by
arthurd
Top achievements
Rank 1
Yarlen
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Share this question
or