Support Center

Help with extending MarkLabel

Jon Apr 24, 2015 07:23PM EDT

Hi I'm trying to inherit from the MarkLabel control and having trouble with the XML serialization.

Public Class MyMarkLabel
Inherits MarkLabel
Implements IMark

Public Sub WriteXml(ByVal writer As XmlWriter) Implements IXmlSerializable.WriteXml
' Write Attributes
writer.WriteStartElement("mark")
writer.WriteAttributeString("type", "EntryAssembly::MyMarkLabel")
...


The ReadXml function doesn't look to ever be called so it seems it isn't able to find the class. I've tried setting the "type" attribute several different ways also including the namespace within the assembly, and the full namespace of the assembly, but it doesn't seem to find it.


1 Data Techniques Response

Up 0 Rated Down
DTI Support  Data Techniques Employee Apr 28, 2015 09:05AM EDT

Hi Jon,
If the ReadXml function isnt being called then its likely because the mark is not being instantiated properly when the xml file is being read. So since we cant create your custom mark then the ReadXML isnt called for that instance to load its state data. Make sure the type information in the xml you write is the correct typename for the class of the custom mark.

Also I note your licensed is not covered by a current subscription which provides all updates, upgrades and support. It would be great if you could renew your plan from the My Products page on our website at http://www.data-tech.com/myproducts.aspx. We'll even start it effective now instead of from when it expired several years ago.

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

This question is closed to new answers.

Contact Us