I have created the following code, similar to this example:
private async void OpenPicture(object sender, RoutedEventArgs e)
{
var openPicker = new Windows.Storage.Pickers.FileOpenPicker();
openPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.PicturesLibrary;
openPicker.FileTypeFilter.Add(".png");
openPicker.FileTypeFilter.Add(".jpg");
Windows.Storage.StorageFile file = await openPicker.PickSingleFileAsync();
if (null != file)
{
try
{
Windows.Storage.Streams.IRandomAccessStream stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
using (var inputStream = stream.GetInputStreamAt(0))
{
await MyInkCanvas.InkPresenter.StrokeContainer.LoadAsync(stream);
}
stream.Dispose();
//rootPage.NotifyUser(inkCanvas.InkPresenter.StrokeContainer.GetStrokes().Count + " stroke(s) loaded!", NotifyType.StatusMessage);
}
catch (Exception ex)
{
// Report I/O errors during load.
//rootPage.NotifyUser(ex.Message, NotifyType.ErrorMessage);
}
}
}
All I want is that the is displayed on my canvas, just like in the example I have linked. But nothing actually gets loaded if I do this.