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

RadDock problem

1 Answer 152 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Artem
Top achievements
Rank 1
Artem asked on 02 Apr 2012, 03:59 PM
Hi, Telerik team 


I have some heavy and rich in features application. I need to support it, so even if i know it was written with some of Telerik controls that are obsolete now I am not allowed to change everything I want to. So please, excuse me for this question.


I have the following layout:
On a winform there is a RadDock.
In it there are two ToolTabStrips, one on the left side and the other one on the right side. In the middle there is DocumentContainer with DocumentTabStrip objects inside it.


I am asked to implement the following functionality:
Some collapse/restore button that will hide both ToolTabStrips and maximize form.  On restore it should return ToolTabStrips to their places, form to normal state. I did it like this:


private void OnMenuViewFullScreenClick(object sender, EventArgs e)
{
    _isMaximized = !_isMaximized;
 
 
    if (_isMaximized)
    {
        toolTabStripLeft.Hide();
        toolTabStripRight.Hide();
        WindowState = FormWindowState.Maximized;
        tbutFullScreen.Checked = true;
    }
    else
    {
        toolTabStripLeft.Show();
        toolTabStripRight.Show();
        WindowState = FormWindowState.Normal;
        tbutFullScreen.Checked = false;
    }
 
 
}



Well, there is one more thing I need to be done and I don't know how to do it. DocumentContainer should be maximized and rstored to initial size as well. How can I acheive it?
Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 05 Apr 2012, 10:33 AM
Hi Artem,

Thank you for writing.

From what I can notice in your code, you are hiding and showing ToolTabStrips rather than ToolWindows. Please note that the correct objects that should be shown and hidden are the ToolWindows. After I modified your code according to this information, my DocumentContainer started getting the correct size and when this size was changed by me, it was automatically saved. I am attaching a sample project and a movie which I shot on top of the project.

I hope this helps. Let me know if you have additional questions.

Kind regards,
Nikolay
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
Dock
Asked by
Artem
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or