I'm really wondering that how to save the inkstrokes with array or list and etc ways.
You could get the InkStroke
read only list by InkStrokeContainer.GetStrokes
method and save this collection by the way you want. For example:
IReadOnlyList<InkStroke> strokes = inkCanvas.InkPresenter.StrokeContainer.GetStrokes();
More details please reference Store and retrieve Windows Ink stroke data.
If your purpose is for loading, you could consider to save strokes to a file, or selected all the strokes and then copy to clipboard for paste. For example:
private void btnreadd_Click(object sender, RoutedEventArgs e)
{
if (inkCanvas.InkPresenter.StrokeContainer.CanPasteFromClipboard())
{
inkCanvas.InkPresenter.StrokeContainer.PasteFromClipboard(new Windows.Foundation.Point(50, 50));
}
}
private void btncollect_Click(object sender, RoutedEventArgs e)
{
IReadOnlyList<InkStroke> strokes = inkCanvas.InkPresenter.StrokeContainer.GetStrokes();
foreach (var stroke in strokes)
{
stroke.Selected = true;
}
inkCanvas.InkPresenter.StrokeContainer.CopySelectedToClipboard();
}