private void SetCropView(Uri data)
        {
            imageWrapper.Visibility         = ViewStates.Gone;
            existingImageWrapper.Visibility = ViewStates.Gone;
            cropViewWrapper.Visibility      = ViewStates.Visible;
            selectedImageUri = data;

            var imageSize = new AppBarImageSize(Resources.DisplayMetrics);
            var fallback  = BitmapDecoder.DecodeSampledBitmapFromResource(Resources,
                                                                          Resource.Drawable.ic_broken_image_white_48dp, imageSize);

            if (!string.IsNullOrEmpty(selectedImageUri?.Path))
            {
                Bitmap bitmap;
                using (var decoder = new BitmapDecoder())
                {
                    bitmap = decoder.DecodeSampledBitmapFromUri(ContentResolver, selectedImageUri, imageSize, fallback);

                    var w = bitmap.Width;

                    var scaledHeight = bitmap.Height * imageSize.Width / w;

                    if (scaledHeight < imageSize.Height)
                    {
                        var h           = bitmap.Height;
                        var scaledWidth = bitmap.Width * imageSize.Height / h;
                        bitmap = Bitmap.CreateScaledBitmap(bitmap, scaledWidth, imageSize.Height, true);
                    }
                    else
                    {
                        bitmap = Bitmap.CreateScaledBitmap(bitmap, imageSize.Width, scaledHeight, true);
                    }
                }

                cropView.SetImageBitmap(bitmap);
            }
        }