Current filter:
                                You should refresh the page.
                                  • hey i am currently running a weird reflection thing and try to get all the contextmenu items and textblocks on all my xaml files,
                                    i use visualtreehelper and bamlreader2006 for this,
                                    but i dont manage to get all the panels for your docklayoutmanager
                                    can you tell me how i get the visualtree to load for all docklayoutmanager panels?


                                1 Solution

                                Creation Date Importance Sort by

                                Hello Simon,

                                You can use the GetItems extension method that returns a collection of BaseLayoutItem objects to get elements located within DockLayoutManager. To get the panels only, use the Where LINQ extension method as follows:

                                var panels1 = dockLayoutManager.GetItems().Where(x => x is LayoutPanel); // or var panels2 = dockLayoutManager.GetItems().OfType<LayoutPanel>();

                                Does this solution meet your requirements?


                                • Simon Mathis 10.16.2015

                                  thanks for the help

                                • Michael Ch (DevExpress Support) 10.16.2015

                                  You're welcome

                                • Customer76916 07.29.2019

                                  Hey !
                                  I want to set panels variable to a list of layout panel (List<LayoutPanel>).
                                  How should i proceed ?

                                • Ivan (DevExpress Support) 07.30.2019

                                  The code snippet we provided already returns a collection of layout panels. We don't offer methods for converting one collection type to another, and you can do this using standard methods such as Cast, OfType, and ToList.

                                  I've updated our code snippet to show a way to obtain panels without using Where - this approach will return IEnumerable. You can use it as a base and extend it further according to your needs.