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

Content clipped when application window resized

4 Answers 451 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Arthur
Top achievements
Rank 1
Arthur asked on 02 Jul 2015, 01:15 PM

Hi,

 

I have the following problem:

I have a simple layout (see Layout.png). There are no min sizes defined.

Now if I resize the application window in the displayed way, my contents are clipped when the document host can no longer shrink  (see Layout2.png).

Can I do something against this behavior?

Arthur

 

 

4 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 06 Jul 2015, 12:16 PM
Hi Arthur,

What we could suggest you in order to achieve the desired behavior of RadDocking is to set the ClipToBounds property to True - thus the content of the Docking control won't be clipped when the Window gets resized. 

Please, give it a try and let us know if it worked for you.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Arthur
Top achievements
Rank 1
answered on 07 Jul 2015, 08:28 AM

Hi,

ClipToBounds has no effect. I have attached a project to illustrate the issue (rename png -> zip, it was not possible to attach it directly).

Just shrink the window horizontally until the document host space is reduced to minimum. Note that it is possible to resize the right panel by the inner resizer even after it is cliped. Looks like something is going wrong in MeasureOverride of RadDocking. It seems to measure the content larger than the size restricted by the window. Using two pass measuring a proportional resizing of the panels to the available space could be achieved (see behavior in VisualStudio).

Arthur

0
Arthur
Top achievements
Rank 1
answered on 08 Jul 2015, 04:18 PM

OK,

now I have drilled down the behavior to source locations:

1) The Widths of the RadSplitContainers on the left and right are set fix either by the ResizeControl on drag drop or DockingPanel.MeasureOverride with initial widths defined by the user.

2) On application window resize RadDockPanel tries to Arrange both split containers with remaining size.

-> First conclusion: RadDockPanel does not support proporional arrange if the available space < desired space, because it works a little bit like DockPanel. It gives the space which is available and not consumed by previously arranged children to its children and it does nothing to try to fit all children if not enough space is available.

 3) When RadDockPanel trys to arrange the RadSplitContainers with remaining size it does not work as expected, because RadSplitContainers do not have ArrangeOverrides, so FrameworkElement.ArrangeOverride is called, which clipps the content when available width is less than the set Width (see Point 1)

-> Second conclusion: So even if proportional arrange would be realized in RadDockPanel, an ArrangeOverride would have to be added to RadSplitContainer, which would arrange the split container to the available size so that clipping woulf not occur.

Seems like a feature request.

0
Nasko
Telerik team
answered on 09 Jul 2015, 06:34 AM
Hi Arthur,

Indeed the observed by you behavior of RadDocking is caused by the DockPanel. All AutoHideAreas of the Docking control are currently arranged by a DockPanel and this is how RadDocking is currently implemented and how the Panes are expected to arrange - the DockPanel is part of the ControlTemplate of the control. What we could suggest you is to log this as a feature request in our Feedback Portal. We will review the item and will consider if the desired behavior should be implemented in RadDocking -  the Feedback portal provides you the ability to track the status of the item.

Meanwhile, if you have any additional questions or concerns regarding Telerik controls please do not hesitate to contact us.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Docking
Asked by
Arthur
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Arthur
Top achievements
Rank 1
Share this question
or