Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

scale

$
0
0

Hi, so I have a page with an image that is bigger than the screen size. I put two scroll views so I can scroll the screen and see the image completely. All of this works great. Now when I want to make the image even bigger I use the scale property, it makes the image bigger but the scroll doesnt move over the entire image anymore, just a little. How can I fix this?

My code (I tryed changing the scale to the image and to the scrolls):

         Image imagen = new Image { };
            imagen.Source = getImageSource();
            imagen.Aspect = Aspect.Fill;
            imagen.Scale = 1;

            ScrollView scrollVertical = new ScrollView();
            scrollVertical.HorizontalOptions = LayoutOptions.FillAndExpand;
            scrollVertical.VerticalOptions = LayoutOptions.Start;
            scrollVertical.Orientation = ScrollOrientation.Vertical;
            scrollVertical.Content = imagen;

            ScrollView scrollHorizontal = new ScrollView();
            scrollHorizontal.HorizontalOptions = LayoutOptions.FillAndExpand;
            scrollHorizontal.VerticalOptions = LayoutOptions.Start;
            scrollVertical.Orientation = ScrollOrientation.Horizontal;
            scrollHorizontal.Content = scrollVertical;

            return scrollHorizontal;

Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>