Properties specific to a custom mark are stored in the UserDataAttributes property. UserDataAttributes is a dictionary that contains a set of key/value pairs, both of type string. When a custom mark is loaded, ART loads the UserDataAttributes dictionary first, and then passes it to the user’s code. The user’s code reads and converts custom properties from the UserDataAttributes dictionary in a specific custom mark constructor, which takes UserDataAttributes dictionary as a parameter.
This constructor must be implemented in the user’s custom mark class. The user also has to provide a code (overridden SavePropertiesToUserData method) to save the mark state into the UserDataAttributes when the ART component is about to save/serialize the mark. Constructor’s code and SavePropertiesToUserData must be consistent.