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

Focus issue after closing a floating pane

1 Answer 35 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Jason asked on 23 Jun 2016, 03:16 PM



I'm trying to close a floating pane then open another window on top of my main form, however the main form being activated once the floating pane is closed resulting in the 2nd form being hidden. Setting the 2nd form to topmost isn't a solution for my requirements. How can I prevent the focus moving back to the main window's docking control?

Here is the xaml code:

<telerik:RadDocking x:Name="radDocking" BorderThickness="0" Padding="0" >
    <telerik:RadSplitContainer x:Name="WorkflowWindowContainer" InitialPosition="FloatingOnly" telerik:RadDocking.FloatingLocation="1250, 700" telerik:RadDocking.FloatingSize="600,250">
        <telerik:RadPaneGroup >
            <telerik:RadPane Header="Floater" x:Name="floatingPane" ContextMenuTemplate="{x:Null}" CanUserClose ="True" IsHidden="False" >
                <Label Content="I'm a floating window"></Label>

Code behind:

floatingPane.IsActive = false;
floatingPane.IsHidden= true;
SecondWindow window = new SecondWindow();

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 27 Jun 2016, 10:42 AM
Hello Jason,

Please note that the floating pane in its basics is a Window and in order to be always shown when the RadDocking is visible (not go behind) it has Owner the RadDocking. So like standard WPF window when it is closed the focus moves to its owner - the MainWindow.

Therefore what I would suggest is to set owner to the SecondWindow - it can be for example the RadDocking or the MainWindow as this would prevent the SecondWindow to appear behind the MainWindow in all scenarios.

Also more on window ownership and activation you can read in this MSDN article.

Hope this would help.

Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question