Image disappears in AbsoluteLayout

Hi there,

I am having a little difficulty trying to get an image to fill the full width of its parent, retain its aspect ratio and determine the height from its width in xaml.
The code I have seems to do what I need but the image disappears and leaves the perfect amount of space for the image.

`

<Label FormattedText="{Binding FormattedQuestionText}"/>

<AbsoluteLayout IsVisible="{Binding HasImage}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Padding="0, 20">
    <Image
         Source="{Binding ImageSource}"
         Aspect="AspectFit"
         AbsoluteLayout.LayoutBounds="0.5, 0.5, 1, AutoSize"
         AbsoluteLayout.LayoutFlags="SizeProportional"/>
    <Label Text="&#xf065;"
           AbsoluteLayout.LayoutBounds="0.5, 0.5, 1, 1"
           AbsoluteLayout.LayoutFlags="All"
           FontSize="Medium"
           TextColor="#0083C7"
           FontAttributes="Bold"
           FontFamily="FontAwesome"/>
  </AbsoluteLayout>

`

Am I doing something silly?

Kind Regards

Brian

Sign In or Register to comment.