I\'m trying to serialize an ink canvas in WPF. So I\'m using StrokeCollection.Save
to save the strokes to a MemoryStream
. But when I try to load th
Did you check the Position of the your stream?
I think that after saving the stroke into it it will point to the end of it.
Try to reset the position to the first character, like this:
using (MemoryStream ms = new MemoryStream())
{
inkcanvas.Strokes.Save(ms);
ms.Position = 0;
inkcanvas.Strokes = new System.Windows.Ink.StrokeCollection(ms);
}