Exclude some controls from State Pesistance

Hi,
I have a DokingManageer in wpf page. It manage some dockable controls and a document area where dynamically users can open, close, modify documents. 
Since the initial view contains only the dockable controls and document area is empty at startup, I would save the last layout used by the user without the reference to controls marked as document.
Unfortunately SaveDockState() save all the controls, and an incorrect layout is throw when loading because documents are not in the control list.
Is it possible to persist the layout which docking controls only, without the documents?  Or I have to implement a my own serializer/loader?

Thanks
S.R.


5 Replies

KR Kannan R Syncfusion Team September 26, 2018 05:57 AM UTC

Hi Sauro, 

Thank you for contacting Syncfusion Support. 

No. At present, the state and location of the controls set based on the other controls as a Target control in our current implementation. 

For an example  

If we dock the Dockable controls bottom of the DocumentContainer which is created in the runtime, its saved as a Side Bottom and its TargetControl is DocumentContainer and then loading the window Dockable controls are not able to find the DocumentContainer which are not created at that time and so its show the Dockable controls are not persisted.  

So, we have considered the reported requirement “Restrict the state persistence for some controls” in DockingManager as a feature request and it will available in any of our upcoming release.  

Regards, 
Kannan 



SR Sauro Rossi September 26, 2018 06:46 AM UTC

Thanks Kannan
for your replay and for take it into consideration as future improvement.
In the meanwhile I just solved with a custom implementation.

Regards
Sauro



KR Kannan R Syncfusion Team September 26, 2018 06:50 AM UTC

Hi Sauro, 
 
Thank you for your update.  
 
We are glad that you found solution for your requirement. Please let us know if you need any further assistance. 
 
Regards, 
Kannan 



AV Avinash March 30, 2019 10:04 AM UTC

Hello,
     I am facing the same problem. Can you please give me some basic idea how should i start to develop custom functionality.
A little help is appreciated.



Thanks 
AK


JP Jagadeesan Pichaimuthu Syncfusion Team April 1, 2019 12:37 PM UTC

Hi Sauro,  
 
Thank you for contacting Syncfusion Support. 
 
DockingManager matches the child collection of saved layout with current DockingManager layout internally and loads properly when DockingManager children collection remains same, so when any child collection changes dynamically, it results in an improper layout. So we cannot restrict serialization of the DockingManager based on the child state.  
 
Regards, 
Jagadeesan 


Loader.
Up arrow icon