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

Remember positions of windows added in code

2 Answers 72 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 13 Mar 2012, 11:35 PM
Hello, it's me again!

I will be adding tabbed documents and tool windows in code and of course it's straight forward to set those into default locations. However, if the user moves this tool window then closes it (fully disposed), later to open it again, i'd like it to open in the location it was last placed. Is this possible or will I need to save some settings to recall ?

thanks in advance
Tony

2 Answers, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 16 Mar 2012, 10:43 AM
Hi Tony,

Thank you for writing.

The easiest way to achieve the desired behavior is to set the CloseAction of the ToolWindow to Hide. When the user would like to reopen the window, you can simply .Show() the ToolWindow instead of create a new instance. RadDock keeps the position of its hidden windows, so the ToolWindow will automatically appear exactly in the location it was closed.

I hope you find my answer useful. Let me know if you have further questions.

Regards,
Boryana
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Tony
Top achievements
Rank 1
answered on 16 Mar 2012, 02:15 PM
Boryana,
Thank you so much for your solution. I look forward to trying this out soon.

regards
Tony
Tags
Dock
Asked by
Tony
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Tony
Top achievements
Rank 1
Share this question
or