Xamarin Forms Image fill width with proper aspect

后端 未结 11 2175
我寻月下人不归
我寻月下人不归 2020-12-09 08:05

Here is xaml (an image in stacklayout). Everything is logical: I set Aspect to AspectFit and HorizontalOptions to FillAndExpand. Width of image must fill the width of stackl

11条回答
  •  执念已碎
    2020-12-09 08:54

    Aspect="AspectFit" use to fit your image inside the layout it can left space if images are small. Aspect="AspectFill" used to fit your image inside the layout and it will strech your image to take full space and it will not left space either your image is small with respect of your parent layout space. So You have to use AspectFill in place of AspectFit.

提交回复
热议问题