Content clipped when application window resized

5 posts, 0 answers
  1. Arthur
    Arthur avatar
    22 posts
    Member since:
    Jul 2014

    Posted 02 Jul 2015 Link to this post

    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

     

     

  2. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 06 Jul 2015 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Arthur
    Arthur avatar
    22 posts
    Member since:
    Jul 2014

    Posted 07 Jul 2015 in reply to Nasko Link to this post

    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

  5. Arthur
    Arthur avatar
    22 posts
    Member since:
    Jul 2014

    Posted 08 Jul 2015 in reply to Arthur Link to this post

    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.

  6. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 09 Jul 2015 Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready