We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

RibbonControlAdv SaveState() / LoadState() not working.

Hi,

In the FormClosing event of my RibbonForm I cam calling the SaveState() method of my RibbonControlAdv control.

In the Load() event I'm calling the LoadState() method of my RibbonControlAdv control.

The problem is that the items I selected and put into the Quick Access Menu are not being persisted. They aren't being reloaded when I call LoadState().

I found a sample project here:

http://files.syncfusion.com/support/tools.windows/kb_samples/tools_wf_ribbon_persistence.zip

From what I can see, all it's doing is calling SaveState() and LoadState() -- and the sample works fine! But when I do the same thing in my project, I get no joy.

Any ideas?

Jon


4 Replies

JL Jonathan Leger May 26, 2011 03:13 AM UTC

Okay, just as some added information: it DOES reload the quick access items if I call LoadState() while the application is still running -- but it does not load them if I close the application and then call LoadState() after running the app again.

The sample code persists the state in between runs.



JL Jonathan Leger May 26, 2011 03:18 AM UTC

Okay, more information: when I check the Application Data / IsolatedStorage folder, the demo application created a SyncfusionToolsStateInfo.bin file -- my application created nothing.

So clearly it's not writing the data (or can't, or something) -- but I have no idea how to correct this as I'm not doing anything special with it at all.



JL Jonathan Leger May 26, 2011 06:12 PM UTC

Well, I was able to work around the problem by using a custom serializer and writing the data to an XML file, but I still haven't figured out why the default IsolatedStorage won't work.



IM Iniyen M A Syncfusion Team May 30, 2011 09:34 AM UTC

Hi Jonathan,

Thanks for your interest in Syncfusion product.

You can achieve your requirement by using RibbonControlAdv’s loadState and SaveState methods with in the Form’s Load and closing events respectively. For more information I have included the sample as follows

[Sample Link]
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=Tools_WF_Ribbon_Persistence41239444.zip

Please let us now if this helps you.

Regards,
Iniyen M.A.



Loader.
Live Chat Icon For mobile
Up arrow icon