Thank you for providing more details on your scenario.
I think you can try the following approach. You need to extend the built in serialization in the RadDiagram - this is demonstrated in this help article
(section Extending Diagram Serialization). Using this method, you need to serialize the resources of the Shapes. I guess similar scenario is described in various C# / WPF forums , for example this one:
The next step is how to serialize only a particular part of a XAML file - the file which will contain your Shapes.
We believe this could help you get started for this custom requirement.