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

My app crashes when adding StyleId to Image

$
0
0

Hi,

I have this image in my app:

<Image Source="{Binding banner_image}" ClassId="{Binding banner_category}" StyleId="{Binding banner_reference}" Aspect="AspectFill">
<Image.GestureRecognizers>
    <TapGestureRecognizer Tapped="OnBannerImageTapGestureRecognizerTapped" NumberOfTapsRequired="1" />
</Image.GestureRecognizers>
</Image>

when I add the StyleId="{Binding banner_reference}" to the image my app crashes with this error:

**Xamarin.Forms.Xaml.XamlParseException: Position 61:92. Cannot assign property "StyleId": Property does not exist, or is not assignable, or mismatching type between value and property
**
but when I remove it then my app works fine.

The banner_reference is not null and it's working beautifully when I assign the banner_reference to the ClassId so there is nothing wrong with the data from my database.

then where is the issue here please?

Thanks,
Jassim


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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