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

RadPane size changing on float

8 Answers 363 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 28 Feb 2012, 09:56 AM
I would like the RadPane to stay the same size when the users drags it to make it go from being docked to being floating, currently it resizes itself. I've seen this thread, but that does not cover how to actually keep it the same size as when it was docked. Possibly another technique would be to use the attached property RadDocking.FloatingSize and bind it to something rather than setting an absolute value, I don't know how this would work though.

thanks

8 Answers, 1 is accepted

Sort by
1
Martin
Top achievements
Rank 1
answered on 01 Mar 2012, 12:57 PM
Is there no solution to this? It would seem to me that the behaviour I am looking for should not only be possible, but should actually be the default. After all, if you look at any other program that has a similar type of docking (such as visual studio), they work how I have described, i.e. the panes maintain their size when floated.
0
Konstantina
Telerik team
answered on 05 Mar 2012, 12:29 PM
Hi Martin,

Unless you know the specific size of the RadPane before dragging and it doesn't change (which will happen once it is dragged), then this cannot be achieved with the current implementation of the control. Unfortunately, there is no way to obtain the size of the RadPaneGroup before the PaneStateChange event, in which its size is already 0,0.
We will consider implementing such feature if we receive more clients' requests.

Regards,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
1
Martin
Top achievements
Rank 1
answered on 05 Mar 2012, 12:42 PM
1) Do you accept that other programs (notably visual studio which otherwise has almost identical docking functionality to yours) works in the manner I have described.

2) Do you accept that having the panes arbitrarily resize when dragged will often give a very poor user experience.
0
Konstantina
Telerik team
answered on 07 Mar 2012, 01:00 PM
Hi Martin,

We are aware of this issue with the Docking control - as you correctly mentioned, we are struggling to make the RadDocking behave as the VS docking. However, the RadDocking supports for now only relative sizing, in order to be able to support absolute sizing it needs to be majorly refactored. We have logged this request in PITS. You can vote for it and track its status. You will be notified when we start working on this request.

Greetings,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
1
Steve
Top achievements
Rank 1
answered on 20 Jun 2012, 08:42 PM
While you're waiting for "major refacoring" try this...
private void OnPaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    var radDock = sender as RadDocking;
    if (radDock.IsLayoutChanging)
    {
        var pane = e.OriginalSource as RadPane;
        if (pane != null)
        {
            var view = pane.Content as UserControl;
            Size size = new Size(view.ActualWidth, view.ActualHeight);
            Point loc = radDock.PointToScreen(new Point(0, 0));
            var win = pane.GetParentToolWindow();
            if (win != null)
            {
                win.Left = loc.X;
                win.Top = loc.Y;
                win.Height = size.Height;
                win.Width = size.Width;
                pane.Visibility = Visibility.Collapsed;
            }
            else
            {
                pane.Visibility = Visibility.Visible;
            }
        }
    }
}

There is a slight shrinkage due to the fact that the method uses the height and width of the pane.Content; however with a little tweaking you could probably adjust for it.  Personally I didn't think it was worth it.  Btw - the diddling with the pane.Visiblity was due to the fact that when the pane was a RadDocumentPane, its tab showed up in the lower left corner of the ToolWindow.

Hope this helps,
Steve









0
Ben
Top achievements
Rank 1
answered on 05 Aug 2015, 08:38 PM

The wait is over :-)

http://docs.telerik.com/devtools/wpf/controls/raddocking/features/retain-pane-size​

0
Luo
Top achievements
Rank 1
answered on 14 Apr 2020, 02:04 AM
I encountered the same problem, is it solved now?
0
Dinko | Tech Support Engineer
Telerik team
answered on 16 Apr 2020, 12:57 PM

Hello Luo,

You check the Retain Pane Size help article, which describes this functionality. Give this article a try and let me know if further assistance is required.

Regards,
Dinko
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Docking
Asked by
Martin
Top achievements
Rank 1
Answers by
Martin
Top achievements
Rank 1
Konstantina
Telerik team
Steve
Top achievements
Rank 1
Ben
Top achievements
Rank 1
Luo
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or