I had issues when trying to copy and paste custom annotations, where the first annotation being copied wouldn't copy its properties.
This was answered by Iva the telerik Admin in one of my support tickets, so I thought I would share the code so that others can benefit from it.
Please use this code in your semantic range start class if you need to copy custom annotations (you will need to change Product & Name to whatever suits your custom annotation properties). Leave CopyContentFromOverride empty.
I hope this helps you as it did me.
Thanks,
Rob
*** Sorry for the typo. The title should be custom not custome ***
This was answered by Iva the telerik Admin in one of my support tickets, so I thought I would share the code so that others can benefit from it.
Please use this code in your semantic range start class if you need to copy custom annotations (you will need to change Product & Name to whatever suits your custom annotation properties). Leave CopyContentFromOverride empty.
protected override void CopyContentFromOverride(DocumentElement fromElement)
{
}
protected override void CopyPropertiesFromOverride(DocumentElement fromElement)
{
base.CopyPropertiesFromOverride(fromElement);
//Your properties to copy here
this.Name = ((SemanticRangeStart)fromElement).Name;
this.Product = ((SematicRangeStart)fromElement).Product;
}
I hope this helps you as it did me.
Thanks,
Rob
*** Sorry for the typo. The title should be custom not custome ***