Approved
Last Updated: 29 May 2019 13:50 by ADMIN
Oliver
Created on: 24 Apr 2019 09:41
Category: Docking
Type: Bug Report
0
LayoutChangeEnded raised before layout has been updated when animations are disabled

Hello Support,

we are using the RadDocking.LayoutChangeEnded event to store the docking layout (via RadDocking.SaveLayout) after the user has changed it.

When animations are enabled (default) everything works as expected and all groups, split containers, and panes are included when in the XML written by RadDocking.SaveLayout.

However, when disabling animations (either using AnimationManager.IsGlobalAnimationEnabled or custom styles for RadWindow and/or ToolWindow setting AnimationManager.IsAnimationEnabled to false) the RadDocking.LayoutChangeEnded event is raised too early.

The faulty behavior can be reproduced with the attached demo application as follows:

1. start the application (App.xaml includes a style for ToolWindow with animations disabled)

2. drag the pane "Solution Explorer" out of the application to create a new tool window

3. drag the "Solution Explorer" tool window onto the "Properties" pane's compass and drop it below "Properties", so that "Properties" and "Solution Explorer" are both pinned right in the application above each other

4. when inspecting the layout written to the "Output" pane you will find that the entry for the RadPane "Solution Explorer" is missing

Any additional change to the docking layout (like resizing a pane) will update the layout and show all panes again.

When enabling animations in the ToolWindow style the above steps will result in the complete layout being written to the "Output" pane.

Please let me know should you require further information for reproduction of this bug.

Best regards,

Oliver

2 comments
ADMIN
Petar Mladenov
Posted on: 29 May 2019 13:50
Hello Oliver,

We can confirm this is an issue in our RadDocking component. You can follow its status here. A possible workaround could be the one with Dispatcher in the event handler.

Regards,
Petar Mladenov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
ADMIN
Petar Mladenov
Posted on: 30 Apr 2019 15:39
Hello Oliver,

Thank you for your details. We managed to reproduce the issue. To be honest this is a complex timing issue - LayoutChangeEnded event fires too early, it even fires twice after the mentioned drop of "Solution Explorer" onto "Properties".  One of the source of this event by design is the drag end of the ToolWindow. We will need some time to discuss the purpose and original design of this event and confirm if the behavior is actually a bug.

Meanwhile you can try several workarounds:

- use PaneStateChange event and also call your Save logic in it
        - call the save logic inside LayoutChangeEnded handler in Dispatcher.Begininvoke.

Regards,
Petar Mladenov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.