Hello,
I just came across a strange exception that is happening depending on LoadFromBinary.
After loading settings into the toolbarsmanager like this,
this.ultraToolbarsManager.LoadFromBinary(...);
and subscribing to this event,
this.ultraToolbarsManager.PropertyChanged += this.PropertyChanged;
and handling it like this,
if (e.ChangeInfo.Source == this.ultraToolbarsManager && e.ChangeInfo.FindPropId(PropertyIds.IsMinimized) != null) {...}
I get a NullReferenceException in Infragistics.Shared.PropChangeInfo.FindPropId(Enum propId)
I even investigated your code and cant see how a NullReferenceException can ever be thrown there.
Skipping LoadFromBinary will not throw the Exception at all.
Using Version 11.2.20112.2050
Thanks for any help!
Blue
Could you please let me know the version of Infragistics which you have been using to save the layout as binary file. Also is it possible to provide me this binary file.
I am waiting for your feedback.
as I already stated in my original post: I am using 11.2.20112.2050
I uploaded the settings as a txt file
thanks
Normal 0 false false false EN-US ZH-TW AR-SA
Could you please reattached your file again in zipped format, because I am not able to open it.
I am waiting for your details.
your fix did a great job, no exceptions anymore. Thanks a lot for your help!
Hello ,
I was able to reproduce your issue only with your second binary file, which make me thinks that may be some how this file is corrupted, however I could suggest you, instead e.ChangeInfo.FindPropId(PropertyIds.IsMinimized)
To use code like:
if (e.ChangeInfo.Source == this.ultraToolbarsManager1 && FindPropId(PropertyIds.IsMinimized,e.ChangeInfo) != null)
{
if (this.ultraToolbarsManager1.Ribbon.IsMinimized)
this.ultraToolbarsManager1.Ribbon.SelectedTab.Settings.Appearance = this.ultraToolbarsManager1.Ribbon.SelectedTab.Settings.SelectedTabItemAppearance;
}
private PropChangeInfo FindPropId(PropertyIds id, PropChangeInfo info)
if (info == null || info.PropId == null)
return null;
if ((PropertyIds)info.PropId == id)
return info;
else
return FindPropId(id, info.Trigger);
Please let me know if you have any further questions.
meanwhile I am using 11.2.20112.2074 and I was able to reproduce this error.
Am I not allowed to modify appearances when changing tabs or minimizing/maximizing the ribbon?
this is a part of my code within the PropertyChanged event handler that causes the error I think:
if (e.ChangeInfo.Source == this.ultraToolbarsManager && e.ChangeInfo.FindPropId(PropertyIds.IsMinimized) != null)
if (this.ultraToolbarsManager.Ribbon.IsMinimized)
this.ultraToolbarsManager.Ribbon.SelectedTab.Settings.Appearance = this.ultraToolbarsManager.Ribbon.SelectedTab.Settings.SelectedTabItemAppearance;
try it out - you need to maximize and minimize the ribbon!
I also upload a more recent binary file
I have tested your dat file with the latest service release Infragistics 11.2 and I do not get any exception, please see attached vide. So my suggestion is to download the latest service release of Infragistics 11.2 and to test again your sample.
http://community.infragistics.com/forums/p/29398/127620.aspx
uploading the BINARY file in a zipped archive for you now.