When the content of the cart is loaded a first time, everything goes well. When I refresh it, the program crashes. On Android everything is fine.
<CollectionView ItemsSource="{Binding Cart}"
SelectionMode="Multiple"
SelectedItems="{Binding SelectedItemsInCart}"
SelectionChanged="On_SelectionChanged"
EmptyView="No ingredients in your cart"
x:Name="collectionView"
HorizontalOptions="Center">
<CollectionView.ItemTemplate>
<DataTemplate>
<SwipeView>
<SwipeView.RightItems>
<SwipeItems >
<SwipeItem Text="Delete"
IconImageSource="trash.png"
BackgroundColor="LightPink"
Command="{Binding RemoveFromCartCommand}"
CommandParameter="{Binding}" />
</SwipeItems>
</SwipeView.RightItems>
<Grid RowDefinitions="auto, auto" x:DataType="model:Ingredient">
<Label Grid.Row="0" Text="{Binding Name}" FontAttributes="Bold" FontSize="20" HorizontalOptions="Center"/>
<Label Grid.Row="1" Text="{Binding Quantity}" FontSize="15" HorizontalOptions="Center"/>
</Grid>
</SwipeView>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
And the error is not very helpful:
Unhandled exception at 0x00007FFB117CE1EF (combase.dll) in CookUs.exe: 0xC0000602: A FailFast exception has occurred. Exception handlers will not be called and the process will terminate immediately.
Without the SwipeView, everything's fine. The SwipeView seems to simply not be supported on Windows, even disabling it if the platform is Windows still makes the program crash.