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

RadSplitContainer.ChildrenOfType

3 Answers 82 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Lior ef
Top achievements
Rank 1
Lior ef asked on 22 Feb 2010, 12:24 PM
hi,

i have this sample code:
RadPane FormRadPane = new RadPane() { Header = "Not Document Pane", CanDockInDocumentHost = false }; 
TextBlock txtBlock = new TextBlock(); 
txtBlock.Text = "This Pane Cannot be docked in to document host"
FormRadPane.Content = txtBlock; 
 
RadPaneGroup NewPaneGroup = new RadPaneGroup(); 
NewPaneGroup.Items.Add(FormRadPane); 
 
RadSplitContainer FormSplitContainer = new RadSplitContainer(); 
FormSplitContainer.InitialPosition = DockState.FloatingDockable; 
FormSplitContainer.Items.Add(NewPaneGroup); 
 
MainDockingControl.Items.Add(FormSplitContainer); 

i've put a breakpoint on the last code row.
in the immediate window in run time i write:
FormSplitContainer.ChildrenOfType<RadPane>() 

and it i get no items i.e. "Items Count = 0".
meaning - the split container doesn't contain any panes.
is that a bug?

3 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 22 Feb 2010, 04:14 PM
Hi Lior,

The reason why the SplitContainer is empty is that when a SplitContainer is moved out of the docking control it actually stays where it was placed initially, but a new SplitContainer is created and all its items are moved to it. The new split container is then placed into a ToolWindow control. This is done this way for future work - we are planning to implement feature that allows to move something back by double clicking the title of the ToolWindow and we decided to leave the SplitContainer there in order to have a kind of place holder.

Hope this information helps you better understand our reason to leave the split container empty instead of moving it into a ToolWindow.

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.
0
Lior ef
Top achievements
Rank 1
answered on 23 Feb 2010, 08:41 AM
hi Miroslav ,

thanks for the reply, but what i'm talking about is right before i'm adding the split container to the docking control.

the break point is on the last code row in the example i wrote, 
meaning that the split container contains the PaneGroup and the Pane,
but the Dock control havn't yet added them.

at that point i wrote this line: 
FormSplitContainer.ChildrenOfType<RadPane>() 
in the Immediate Window in debug and i get "Item Count = 0".

 

0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 23 Feb 2010, 12:39 PM
Hello Lior,

 Before adding an ItemsControl to the Visual tree it doesn't apply its control template and doesn't have ItemsPresenter. Before having ItemsPresenter the ItemsControl doesn't have any of its children in its visual tree. The answer described in the previous post is when you add the SplitContainer to the Docking control.

Hope this helps.

All the best,
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
Lior ef
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Lior ef
Top achievements
Rank 1
Share this question
or