コード例 #1
0
        private async void OnBrowsePictures()
        {
            try
            {
                var file = await FilePickerHelper.PickSingleFile();

                if (file != null)
                {
                    _navigationFacade.NavigateToCropView(file);
                }
            }
            catch (InvalidImageDimensionsException)
            {
                var resourceLoader = ResourceLoader.GetForCurrentView();
                var message        = string.Format(resourceLoader.GetString("InvalidImageSize_Message"),
                                                   PhotoTypeContract.Standard.ToSideLength());
                var title = resourceLoader.GetString("InvalidImageSize_Title");

                await _dialogService.ShowNotification(message, title, false);
            }
        }