Hide a floating panel

2 posts, 0 answers
  1. Edward
    Edward  avatar
    32 posts
    Member since:
    Jan 2008

    Posted 23 Jan 2008 Link to this post

    I want my program to hide and float a DockPanel.  Initially, I create a dock panel in the designer and set the DockState to Hidden.

    To show the panel, I just set DockState to Floating.  This works fine.

    However, I cannot hide the panel.  I tried the following:

    - Set the DockState to Hidden
    - DockPanel.Hide()

    However, the panel continues to float.  The only way I figure to get it work is to DockTo another panel, then set the DockState to Hidden.  This seems to be cumbersome so I wonder if there is a way to hide it better.
  2. Julian Benkov
    Julian Benkov avatar
    1135 posts

    Posted 25 Jan 2008 Link to this post

    Hi Edward,

    In order to hide a DockPanel, please use the code snippet below:

    private void button2_Click(object sender, EventArgs e)  
        if (dockPanel2.DockingSite.HostForm != null)  
    private void button3_Click(object sender, EventArgs e)  

    I hope this was helpful. Please contact us again if you have additional questions.

    Best wishes,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
Back to Top