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

Pane size lost when maximize a minimized tab that was previously maximized

5 Answers 135 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Etienne
Top achievements
Rank 1
Etienne asked on 21 Jan 2015, 09:44 PM
Hi,

I have a docking with some tabPane that I dedock and maximize in a second monitor. When I minimize my application and then maximize it, the tabPane isn't maximized anymore. Is there a way to fix this problem ?

Thank you,

Etienne

5 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 26 Jan 2015, 11:17 AM
Hello Etienne,

This is an expected behavior and it is caused by the default framework behavior of the native WPF Window. The floating Pane is placed in ToolWindow which inherits from RadWidndow and RadWindow is hosted in native WPF Window. So you can observe the same behavior using native WPF Windows - if you maximize a child Window with Owner MainWindow on the second screen and minimize and restore the MainWindow the child Window will get restored to its initial size.

Hope this helps.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Etienne
Top achievements
Rank 1
answered on 26 Jan 2015, 03:16 PM
Hello Kalin,

So is there a way to get the behavior that I expect with RadDocking ?

Also, I compared with Visual Studio and it's not the same behavior than RadDocking. When the parent window of a maximized child window is minimized and maximized back, the child window is maximized.

Thank you,

Etienne
0
Kalin
Telerik team
answered on 29 Jan 2015, 12:48 PM
Hi Etienne,

You would need to manually implement that behavior. For example to hook to the StateChanged event of the Window and when minimizing the find all of the maximized ToolWindows and the MainWindow is restored to Maximize the needed ToolWindows (you might need to use a Dispatcher). Also note that this might cause flickering (when manually maximizing the ToolWindow).

Indeed the VisialStudio behaves differently - it behaves differently for the different child windows (test the same scenario with one of the coding child windows).

Hope this helps.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Markus Hopfenspirger
Top achievements
Rank 2
answered on 28 Jun 2018, 02:06 PM

I had the same problem and with the help of this thread and some others I developed this helper function. You can call this Function on StateChanged of the window.

Instead of ActionScheduler.ScheduleAction(...) you can probably use Dispatcher.BeginInvoke(...)

public static void HandleWindowsStateChanged(Window window) {
    try {
        if (window.WindowState == WindowState.Minimized) return;
 
        var docking = window.ChildrenOfType<Telerik.Windows.Controls.RadDocking>();
        foreach (var radDocking in docking) {
            foreach (var pane in radDocking.Panes) {
                if (pane.IsFloating) {
                    var toolWindow = pane.ParentOfType<ToolWindow>();
                    if (toolWindow != null && toolWindow.WindowState == WindowState.Maximized) {
                        ActionScheduler.ScheduleAction(() => toolWindow.WindowState = WindowState.Maximized, true, delayInMilliseconds: 600);
                    }
                }
            }
        }
    } catch {
        //Ignor errors here
    }
}

0
Kalin
Telerik team
answered on 02 Jul 2018, 08:48 AM
Hi Markus,

Thanks for sharing your implementation.

Regards,
Kalin
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Docking
Asked by
Etienne
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Etienne
Top achievements
Rank 1
Markus Hopfenspirger
Top achievements
Rank 2
Share this question
or