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?
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?