var file = await StorageFile.GetFileFromPathAsync(ImagePath);
Здесь Путь изображения - это строка.Следующий код генерирует исключение при открытии файла
An exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll but was not handled in user code
WinRT information: Cannot access the specified file or folder (폰ጼ¿). The item is not in a location that the application has access to (including application data folders, folders that are accessible via capabilities, and persisted items in the StorageApplicationPermissions lists). Verify that the file is not marked with system or hidden file attributes.
Исключение кажется мне достаточно понятным - непонятно, каков ваш вопрос. Этот путь похож на тот, который существует на вашей машине? Если да, проверяете ли вы разрешения и атрибуты, как указано в исключении? –
Путь существует в машине. Скажем, ImagePath - это C: \ Users \ superfast \ Desktop \ image.Jpg –
Вы можете опубликовать значение 'ImagePath' при возникновении исключения? – dotctor