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

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.

No the content not appears after click on the tab or or dragging it around to a different docking position.
Thanks
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);
}
Miroslav Nedyalkov
the Telerik team

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