Profile Picture

XML serialization of NInteractivity style

Posted By Anna Lear 15 Years Ago
Author
Message
Anna Lear
Posted 15 Years Ago
View Quick Profile
Junior Member

Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 12, Visits: 1
Is it possible to serialize interactivity styles within a diagram?

Here's my workflow: I load a diagram from disk. Find a shape I want to make interactive and set its InteractivityStyle:
shape.Style.InteractivityStyle = new NInteractivityStyle(true, null, null, CursorType.Default, "http://my.url.com");

Then I attempt to save the NDrawingDocument in XML format, but the XML serialization stops after writing out only a few lines of XML. See attachment for the output file.

I tried to manually edit the NDX file to add InteractivityStyle tags to the desired shapes. But when I did that, I was no longer able to load the diagram from the file. There were no error messages or exceptions. The following code just returned null:

NPersistencyManager mgr = new NPersistencyManager();
NDrawingDocument document = mgr.LoadDrawingFromFile("diagram.ndx");

What am I doing wrong here? Thanks.

Attachments
IncompleteXML.xml (96 views, 1.00 KB)
Ivo Milanov
Posted 15 Years Ago
View Quick Profile
Forum Member

Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 35, Visits: 15
Hi Anna,

Your code is OK, however the NUserDataAttribute and NImageMapObjectAttribute interactivity attributes were not added to the expected types of interactivity attributes for XML serialization. This problem is now fixed and the fix will appear in the next release (expected next week).

Best regards,
Ivo

Anna Lear
Posted 15 Years Ago
View Quick Profile
Junior Member

Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 12, Visits: 1
Sounds good. Thanks, Ivo!



Similar Topics


Reading This Topic