Select to view content in your preferred language

Save SketchGraphicLayer to XML file

648
0
01-20-2012 09:45 AM
CiprianLazar
Deactivated User
I am building a recovery feature for an Windows Mobile application. Suppose that someone is drawing a sketch in a SketchGraphicLayer and the battery runs out and the device stops working. I want to be able to recover the drawing when the application is restarted. For this to work, I need to save the drawing to a file after every edit in the drawing and then restore it if the user wishes so. I chose to save the drawing into a XML file. I tried using the XmlWrite and XmlRead methods of the Geometry class of the SketchGraphicLayer, but they don't seem to work as I expected. The ESRI's documentation for these methods is practically nonexistent.
So my question is: Can I use Geometry.XmlWrite(XmlWriter writer) to write a geometry to file and then restore it in another session of the application using Geometry.XmlRead(XmlReader reader)? Or do I need to build my own methods in order to acquire this?
0 Kudos
0 Replies