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

RadDock: Resize controls inside DocumentWindow - Button AutoHide On/Off of ToolWindow.

2 Answers 150 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Eusebio
Top achievements
Rank 1
Veteran
Eusebio asked on 14 Jan 2021, 02:09 PM
Hello,
Using the RadDock
Can you please suggest what strategy should I apply for when the Properties "panel" collapses and the content of the "Simogram" is resized?

Perhaps that when said "panel" collapses, use the event that is fired when that panel has finished collapsing (can you tell me which event it is?) And do the corresponding operations to redraw the content of the Simogram. And redraw the Simogram when we maximize that panel.

Another option might be to have the controls inside the Simogram "panel" stretch or shrink automatically (perhaps using some properties of those internal controls), but I have no idea how to do that.

I have attached an image.

Thanks a lot!!

2 Answers, 1 is accepted

Sort by
0
Eusebio
Top achievements
Rank 1
Veteran
answered on 15 Jan 2021, 10:02 AM
I'm testing with the DockStateChanged event but it doesn't return the correct value for the width of the documentWindow.
Can you tell me in which event I get the correct value of the width of the documentWindow when a toolWindow has finished collapsing?
 Can you help me please?
0
Nadya | Tech Support Engineer
Telerik team
answered on 18 Jan 2021, 02:03 PM

Hello, Eusebio,

According to the provided information, it seems that you have a document window and added some controls to it and you would like the hosted controls within it to resize automatically when the tool window changes its size. Note, if your application requires a layout that arranges itself appropriately as the window is resized or as its contents change in size it is not necessary to use events in your code and calculate sizes each time the window size has changed. When you need a dynamic layout you should consider using a layout panel so your layout can change smoothly as your window is resized. For example, I can suggest using a TableLayoutPanel. More information about arranging controls you can find here: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/controls/walkthrough-arranging-controls-on-windows-forms-using-a-tablelayoutpanel?view=netframeworkdesktop-4.8#arranging-controls-in-rows-and-columns 

The TableLayoutPanel arranges its contents in a grid, providing functionality similar to the HTML <table> element. The TableLayoutPanel control allows you to place controls in a grid layout without requiring you to precisely specify the position of each individual control. Its cells are arranged in rows and columns, and these can have different sizes. The controls in the TableLayoutPanel can be docked or anchored according to your specific needs by using Dock and Anchor properties. Thus, the controls would automatically resize along with resizing the panel they are hosted in. 

I hope this information helps.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Dock
Asked by
Eusebio
Top achievements
Rank 1
Veteran
Answers by
Eusebio
Top achievements
Rank 1
Veteran
Nadya | Tech Support Engineer
Telerik team
Share this question
or