[DevExpress Support Team: CLONED FROM S135134: How do I provide the capability to collapse or expand layout groups and persist their state?]
Hi Dennis.
I am researching your code sample (the implementation of ExpandableLayoutGroupViewController) as well as some other related code samples (see Q101774, Q582278) and also read the document Access Layout Control. Everywhere is used sligthly different ways of accessing LayoutControl's items and it's a little confusing.
- Can you please explain why you initialize "expand-collapse" feature of layout groups within HandleCreated event handler? It looks very unusual. Why don't you do it just within ViewControlsCreated handler as stated in Access Layout Control document? What's the purpose of your approach?
- Also I wonder why you access LayoutControl through View.LayoutManager.Container but not through View.Control?
- And the last question. It's unclear why you first gather things into collection (itemToWinModelLayoutGroupExtenderMap) and then do the main initialization (i.e. set ExpandButtonVisible, Expanded etc. properties) in a separate step. Why not do all this job at once utilizing single event handler either WinLayoutManager.ItemCreated or HandleCreated/ViewControlsCreated?
Thanks in advance
Hi Sargis,
We need additional time to answer your questions. Please bear with us. We will get back to you as soon as possible.