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

Hide a floating panel

1 Answer 56 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 24 Jan 2008, 04:54 AM
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.

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 25 Jan 2008, 09:31 AM
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)  
    {  
        dockPanel2.DockingSite.HostForm.Hide();  
    }  
    else 
    {  
        dockPanel2.Hide();  
    }  
}  
 
private void button3_Click(object sender, EventArgs e)  
{  
    dockPanel2.Show();  

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
Tags
Dock
Asked by
Edward
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or