Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

CollectionView does not allow you to re-select the same item that was just selected

$
0
0

I know collection view is still experimental and should probably use listview for now. i Just wanted to get clarity in case others have this issue too.

so let's say i have a collection view working perfectly here. code is from the collectionview demo by microsoft

<CollectionView ItemsSource="{Binding Monkeys}" SelectionMode="Single" SelectionChanged="OnCollectionViewSelectionChanged"> <CollectionView.ItemTemplate> <DataTemplate> <Grid Padding="10"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Image Grid.RowSpan="2" Source="{Binding ImageUrl}" Aspect="AspectFill" HeightRequest="60" WidthRequest="60" /> <Label Grid.Column="1" Text="{Binding Name}" FontAttributes="Bold" /> <Label Grid.Row="1" Grid.Column="1" Text="{Binding Location}" FontAttributes="Italic" VerticalOptions="End" /> </Grid> </DataTemplate> </CollectionView.ItemTemplate> </CollectionView>

it shows a list like this

so i select the baboon african and asia and the selectionchanged event fires. works well.

but if i select the baboon african and asia again, immediately after selecting it, the event does not fire.

i have to select a different item in the list first.

has anyone experienced this before or i am just alone. i faced this in an app i am doing for my company hence the research


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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