1

I'm using the IMediaPicker lines to open gallery and pick an image:

using XLabs.Platform.Services.Media;
using XLabs.Platform.Device;
using XLabs.Ioc;
using Xamarin.Forms;

private async Task<string> pickImage(){
var device = Resolver.Resolve<IDevice>();
            IMediaPicker mediaPicker = DependencyService.Get<IMediaPicker>() ?? device.MediaPicker;
            if (mediaPicker == null)
                throw new NullReferenceException("Media picker initialize error");
            string ImageSource = null;
            try
            {
                if (mediaPicker.IsPhotosSupported)
                {

                    var mediaFile = await mediaPicker.SelectPhotoAsync(new CameraMediaStorageOptions
                    {
                        MaxPixelDimension = 400
                    });
                    ImageSource = mediaFile.Path;
                }
            }
            catch (System.Exception)
            {

            }
            return ImageSource;
}

However when I trigger the function in iPad it look like this: enter image description here The gallery only shows up as the size of an iPhone4 and there seems to be no where to change the frame or size. All I want is to display a full screen for it.

It worked well in android tablets.

Is there a work around?

Fan Zhang
  • 240
  • 3
  • 9

0 Answers0