c# - how can I save a content of a canvas drawn by a user? -


i'm having following problem:

i'm trying save content of application. content drawn on canvas via users. example:

a user might click on button draw ellipse, etc.

after clicking button, drawing displayed on canvas.

i want save content drawn user on canvas. give me hint. if use serialization , deserialization?

the code written in c# using visual studio 2012, windows 8 app

there several ways of solving this:

  1. save each action of user - undo/redo stack. flexible files can big. in case you'd serialize stack of commands. load command have replayed.

  2. save logical construction of drawing - html or svg. no undo/redo support smaller files. in case you'd serialize document model.

  3. save each resulting bitmap after action - easier implement 1. , 2. harder support editing of elements. no serialization of .net objects lot of bitmaps.

each approach has advantages , disadvantages.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -