I need a simplest way to save the toolbars positions on a form.
I have an UltraToolbarsManager, but only SaveAsXml/Binary with saveCustomizations = False works. I tested, but apparently this does not remember the toolbars positions when i reopen the form.
If I set saveCustomizations = True, then a System.ApplicationException was unhandled exceptions appears, indicating some serialization problems, that appears:
System.ApplicationException was unhandled Message=Error encountered while serializing data into stream. Source=Infragistics2.Win.UltraWinToolbars.v6.3 StackTrace: at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.SaveHelper(Stream stream, Boolean saveAsBinary, Boolean saveCustomizations) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.SaveAsXml(String filename, Boolean saveCustomizations) at MyNamespace.MyForms.MyForm.SavePreference() at MyNamespace.MyForms.MyForm.MyForm_FormClosed(Object sender, FormClosedEventArgs e)
The same story is with BinarySerialization, or with UltraToolbarsManager.SaveSettings = Tru, or also SaveComponentSetting()...
What to do? How can I recuperate the toolbars coordinates to save them into the DB or file manually?
Hello Serhiol,
The easiest way to achieve desired behavior could be if you are using both methods:
ultraToolbarsManager1.SaveComponentSettings();
ultraToolbarsManager1.LoadComponentSettings();
I made a test using our latest available versions and everything works properly. Could you please tell me what is your current version and do you have any installed service release and which one.
Let me know if you have any questions.
Regards
Hi, Georgi, thank you wor your reply.
As I described in my post I already used the SaveComponentSettings() but failed. with the specified error.
Also from the error message above we can see the Infragistics version 6.3... I suppose in the classical variant of a toolbar the serialization works, but if I have some images (handlers) or other kind of "non-standard" toolbars options, the serialization fails.
What will be great that even some elements (like some images buttons or stuff) can't be serialized, at least other elements be serialized, but not if one element fails to be serialized, all others fails too... is not very good.