To save synchronously to a Nevron Binary Drawing local file call the SaveToLocalFile method of the drawing view. This method doesn't work on sandboxed platforms like Blazor WebAssembly.
Save to a Nevron Binary Drawing file synchronously |
Copy Code
|
---|---|
drawingView.SaveToLocalFile(@"D:\Documents\MyDrawing.ndb");
|
To save a drawing to a file asynchronously call the SaveToFileAsync method of the drawing view. Calling this method shows a loader over the drawing view until the saving completes. The method returns a promise, which you can use to get notified when the saving completes.
Save to a Nevron Binary Drawing file asynchronously |
Copy Code
|
---|---|
drawingView.SaveToFileAsync(@"D:\Documents\MyDrawing.ndb").Then( delegate (bool success) { }, delegate (Exception ex) { } ); |
To save a drawing to a stream call the SaveToStream method of the drawing view and pass the drawing format to save to:
Save to Nevron Binary Drawing stream |
Copy Code
|
---|---|
drawingView.SaveToStream(stream, NDrawingFormat.NevronBinary); |