ShapeCollectionSave
Last updated
Was this helpful?
Last updated
Was this helpful?
The ShapeCollectionSave class is a class. Save classes are classes which allow you to load XML files to runtime objects as well as to save data contained in runtime objects to XML files. For more information on Save files, check .
You do not need to use the ShapeCollectionSave class in most cases since the FlatRedBallServices' Load method can load ShapeCollections. If you are simply looking to load a ShapeCollection, see .
You can use ShapeCollectionSave if you are making a tool that works with the .shcx file format.
You can load load a ShapeCollectionSave as follows:
Sha'eCollectionSaves can be saved through the Save method. Therefore, the process of saving an existing ShapeCollectionSave is very simple:
The more complicated process is to construct the ShapeCollectionSave. You can construct a ShapeCollectionSave by creating a ShapeCollectionSave from an existing or manually (by instantiating and adding instances to it).
The following code saves a .shcxfile named MyShapeCollection.shcx. It assumes that shapeCollection is a valid .
Add the following using statements:
The steps for creating a ShapeCollectionSave manually are:
Instantiate a ShapeCollectionSave
Save using the Save method.
You can convert ShapeCollectionSaves into runtime ShapeCollections: Add the following using statements:
Assumes "save" is a valid ShapeCollectionSave:
Assumes shapeCollection is a valid :
Add "save" instances to the ShapeCollectionSave (such as and )
Did this article leave any questions unanswered? Post any question in our for a rapid response.