Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
190
Desserialization layout UltraPictureBox
posted

I am trying to deserialize layout of my UltraPictureBox.

;/Property>
      <Property name="Appearance">
        <InstanceDescriptor member="AAEAAAD/////AQAAAAAAAAAEAQAAAC9TeXN0ZW0uUmVmbGVjdGlvbi5NZW1iZXJJbmZvU2VyaWFsaXphdGlvbkhvbGRlcgcAAAAETmFtZQxBc3NlbWJseU5hbWUJQ2xhc3NOYW1lCVNpZ25hdHVyZQpTaWduYXR1cmUyCk1lbWJlclR5cGUQR2VuZXJpY0FyZ3VtZW50cwEBAQEBAAMIDVN5c3RlbS5UeXBlW10GAgAAAAUuY3RvcgYDAAAAYkluZnJhZ2lzdGljczQuV2luLnYxNC4yLCBWZXJzaW9uPTE0LjIuMjAxNDIuMjAzNCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj03ZGQ1YzMxNjNmMmNkMGNiBgQAAAAbSW5mcmFnaXN0aWNzLldpbi5BcHBlYXJhbmNlBgUAAAAMVm9pZCAuY3RvcigpBgYAAAAHLmN0b3IoKQEAAAAKCw==">
          <Property name="ImageHAlign">Center</Property>
          <Property name="ImageVAlign">Top</Property>
        </InstanceDescriptor>
      </Property>

When I am deserializing member attribute of InstanceDescriptor then I have an error:Could not load file or assembly 'Infragistics4.Win.v14.2,
Version=14.2.20142.2034.

The error occurs for old layout which was serialized with old version v14.2. Currently we are using v16.2.
I am using the following code to deserialize it:

 byte[] data = Convert.FromBase64String(memberAttr.Value);
  BinaryFormatter formatter = new BinaryFormatter();
  MemoryStream stream = new MemoryStream(data);
  MemberInfo mi2 = (MemberInfo)formatter.Deserialize(stream);

If the layout was serialized with latest version (v16.2) then It can be deserialized.
How can I deserialize member attribute of InstanceDescriptor which was serialized with old libraries?

Thanks.

Parents Reply Children