I'm using the Listview with the swipe options.
Now I wanted to have a dynamic mapping between the item and an Icon shown.
here is my template
<xForms:SfListView.RightSwipeTemplate>
<DataTemplate x:Name="RightSwipeTemplate">
<Grid>
<Grid
Grid.Column="0"
BackgroundColor="#009EDA"
HorizontalOptions="Fill"
VerticalOptions="Fill">
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Image
Grid.Row="0"
Grid.Column="0"
BackgroundColor="Transparent"
BindingContextChanged="RightImage_BindingContextChanged"
HeightRequest="35"
WidthRequest="35">
<Image.Source>
<FontImageSource
FontFamily="{DynamicResource BoxPlannerFonts}"
Glyph="{Binding Read, Converter={StaticResource BoolToImageConverter}, FallbackValue=true, TargetNullValue=true}"
Size="24" />
</Image.Source>
</Image>
</Grid>
</Grid>
</Grid>
</DataTemplate>
</xForms:SfListView.RightSwipeTemplate>
I'm trying to access the "Read" attribute of the item, so that I can have a different image presented when the status changes.
Before I used the binding contextchanged, but this only works once.
If I want to switch between read and unread, then the swipe image is always the same.