How clear Layout

2 posts, 0 answers
  1. Weliton Flor
    Weliton Flor avatar
    12 posts
    Member since:
    Oct 2009

    Posted 23 Mar 2010 Link to this post


    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.

  2. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 23 Mar 2010 Link to this post

    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.

    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