Current filter:
                                You should refresh the page.
                                  • I have a need to order mdi documents in a specific order. I think this is done with the index.  I'm not sure how to access or change the order.
                                    I'm using this basic layout

                                    [XAML]
                                    <custom:DevExDockLayoutManager Name="dockLayoutManager1" DisposeOnWindowClosing="False" FloatingMode="Desktop" ClosedPanelsBarPosition="Bottom" ClosedPanelsBarVisibility="Auto" Grid.Row="1" DestroyLastDocumentGroup="False" ShowFloatWindowsInTaskbar="False" FloatingDocumentContainer="Default" MDIItemActivated="dockLayoutManager1_MDIItemActivated"> <custom:DevExDockLayoutManager.LayoutRoot> <custom:DevExLayoutGroup Name="Root" Selector.SelectionChanged="Root_SelectionChanged" AllowClose="True" AllowHide="False" HeaderBarContainerControlAllowDrop="True"> <custom:DevExDocumentGroup x:Name="documentGroup1" ShowCloseButton="False" MDIStyle="MDI" AllowClose="False" AllowHide="False"> </custom:DevExDocumentGroup> </custom:DevExLayoutGroup> </custom:DevExDockLayoutManager.LayoutRoot> </custom:DevExDockLayoutManager>

                                    Use case would be for a user to choose to cascade all the mdi document panels and the order front to back be something other than the order the panels were created, which is how is orders now

                                    [C#]
                                    var items = this.dockLayoutManager1.GetItems().OfType<DocumentPanel>().ToList(); foreach (var item in items) { this.dockLayoutManager1.MDIController.Cascade(item); }

                                    In short, I need to set the index so I can orderby it.

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,

                                DockLayoutManager does not allow you to explicitly control the order of panels when you execute the Cascade method. The order of panels during this procedure depends on the order of these panels in the Items collection. Moreover, this order is changed when an end user activates panels. The latter can help you correct this order according to your requirements.

                                To be more precise, you can set the Tag property in your panels to required indexes and call the Activate method in the corresponding order. After that, call the Cascade method:

                                [C#]
                                private void Button_Click_2(object sender, RoutedEventArgs e) { group.Items.OrderBy(c => c.Tag).ForEach(c => dockLayoutManager1.Activate(c)); this.dockLayoutManager1.MDIController.Cascade(group); }

                                Please try this approach and let us know your results.

                                Thanks,
                                Andrey