The exception is thrown for the RotationAngle property.
The issue can be observed also in the opposite direction - the diagram is serialized on a machine with some culture (for example Portugal Porguese - pt-PT) and then restored on a machine with an English culture.
The issue reproduces only when saving and loading between cultures which numeric separators are different. For example, with Bulgarian culture, the number 4.5 is represented as 4,5 (with a comma). With English culture the number will be represented as 4.5 (with a period).
To work this around, create a custom RadDiagramShape and override its Deserialize() method. Then parse the RotationAngle manually, and set it to the RotationAngle property of the shape. After this, set the RotationAngle of the SerializationInfo to null, in order to prevent the default restoring of the property.
public
partial
class
CustomShape : RadDiagramShape, IEquatable<BaseShape>
{
public
override
void
Deserialize(SerializationInfo info)
{
if
(info[
"RotationAngle"
] !=
null
)
{
var angle = Convert.ToDouble(info[
"RotationAngle"
].ToString(), CultureInfo.InvariantCulture);
this
.RotationAngle = angle;
info[
"RotationAngle"
] =
null
;
}
base
.Deserialize(info);
}
}