你好,
你可以在转换之前做一个判断,如果是DesignerStroke的话,在转换。下面的代码你可以参考一下。
DesignerStroke s ;
StrokeCollection strokes = new StrokeCollection(fileStream);
foreach (var item in strokes)
{
if (item is DesignerStroke)
{
s = (DesignerStroke)item;
inkcanvas.Strokes.Add(s);
}
}
Best regards,
Zhanglong
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.