I am new with xamarin, I am facing an issue in my xamarin forms project. I have an inside listview-viewcell, having 250 width and height. Sometimes the value of mediaUrl is null. I want to hide the Image for null mediaUrl values and make visible for other values. My problem is if the value of the mediaUrl is null showing blank space in the UI. Inside isVisible property how can I apply this condition? My code is giving below:
<StackLayout>
<ListView>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout>
<Image
WidthRequest="250"
HeightRequest="250"
Source="{Binding mediaUrl}"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
Anybody please suggest a solution with working code. Thanks in advance