I am new with xamarin, I am facing an issue in my xamarin forms project. I have two images inside listview-viewcell, one is for showing like and other for unlike. If the value of isUserLiked is true show the second image and otherwise show the first one. I try with !, but not working. Here is my code:
<StackLayout HeightRequest="500">
<ListView x:Name="ListView1" RowHeight="500" HorizontalOptions="CenterAndExpand">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout
Orientation="Vertical">
<Image
Source="unlike.png"
IsVisible="{Binding !isUserLiked}">
</Image>
<Image
Source="like.png"
IsVisible="{Binding isUserLiked}">
</Image>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
How to reverse the binding value inside listview-viewcell. Anybody please suggest a solution with working code. Thanks in advance.