You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var picker = new FileSavePicker();
picker.FileTypeChoices.Add("Jpegs", new List<string>() { ".jpg" });
var file = await picker.PickSaveFileAsync();
if (file == null)
return;
using (var stream = await file.OpenAsync(FileAccessMode.ReadWrite))
{
var renderTarget = new CanvasRenderTarget(device, (float)Canvas1.ActualWidth, (float)Canvas1.ActualHeight, 96);
await renderTarget.SaveAsync(file.Path, CanvasBitmapFileFormat.Jpeg);
}
}
which raise an exception when the "SaveAsync" is called:
System.UnauthorizedAccessException: "Zugriff verweigert (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
Access denied basically.
Any Suggestion?
The text was updated successfully, but these errors were encountered:
Hi Shawn,
thanks for your prompt Feedback! I'm a bit confused because I see that this methods is expecting in sequence the filename and the file Format:
Hi all,
I have a UWP Desktop application in which I have a page with a CanvasControl. I have the following method:
public async void SaveImage()
{
//CanvasDevice device = CanvasDevice.GetSharedDevice();
CanvasDevice device = Canvas1.Device;
which raise an exception when the "SaveAsync" is called:
System.UnauthorizedAccessException: "Zugriff verweigert (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
Access denied basically.
Any Suggestion?
The text was updated successfully, but these errors were encountered: