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

How clear Layout

1 Answer 32 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Weliton Flor
Top achievements
Rank 1
Weliton Flor asked on 23 Mar 2010, 01:49 PM
Hi,

How can I clear layout, for exemple, I have many panes, and need to close all to clear layout of my screen.

I try to find some method .Clear(), but not exists, and in documentation can not find anything.

Tks

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 23 Mar 2010, 01:55 PM
Hi Weliton,

 There is no such method in the Docking control. What I would suggest you is to enumerate all the panes and set their IsHiddent property to true (if you want to close them) or to call their RemoveFromParent method (if you want to destroy them). Here is an example of what I mean:

void Clear(RadDocking dock)
{
 foreach (var pane in dock.Panes.ToList())
 {
  pane.IsHidden = true; // to hide the pane
  //pane.RemoveFromParent(); to destroy the pane
 }
}
Hope this helps.

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.
Tags
Docking
Asked by
Weliton Flor
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or