Hi
I am trying to use collection view selection mode multiple and selection change event but it's not working and selection change event not fire
<CollectionView x:Name="CVStudentData" HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never" SelectionMode="Multiple"
Margin="5,10,5,0" BackgroundColor="White" VerticalOptions="CenterAndExpand" HorizontalOptions="FillAndExpand"
SelectionChanged="CVStudentData_SelectionChanged">
<CollectionView.Header>
<Grid HorizontalOptions="FillAndExpand" VerticalOptions="CenterAndExpand">
<Frame IsVisible="False" CornerRadius="10" HasShadow="False" IsClippedToBounds="True" BorderColor="Black">
<Label Text="No record found" TextColor="Red" FontAttributes="Bold" FontSize="16" VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"/>
</Frame>
</Grid>
</CollectionView.Header>
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical" Span="1" VerticalItemSpacing="5" HorizontalItemSpacing="10"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame CornerRadius="10" Padding="10" Margin="0" HasShadow="False" IsClippedToBounds="True" BorderColor="Black"
BackgroundColor="Black">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Selected">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="Red" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid RowSpacing="10" ColumnDefinitions="*,*">
<Label Grid.Column="0" Text="{Binding Id}" TextColor="White" FontSize="14"
VerticalOptions="CenterAndExpand" HorizontalOptions="StartAndExpand"/>
<Label Grid.Column="1" Text="{Binding StudentName}" TextColor="White" FontSize="14"
VerticalOptions="CenterAndExpand" HorizontalOptions="StartAndExpand"/>
</Grid>
</Frame>
</DataTemplate>
</CollectionView.ItemTemplate>
<CollectionView.Footer>
<StackLayout Orientation="Vertical" Padding="0,5,0,0">
<Label Text=""/>
</StackLayout>
</CollectionView.Footer>
</CollectionView>
List<StudentModel> studentModels = new List<StudentModel>();
studentModels = new List<StudentModel>();
studentModels.Add(new StudentModel { Id = 1, StudentName = "Sanajay" });
studentModels.Add(new StudentModel { Id = 2, StudentName = "Ajay" });
studentModels.Add(new StudentModel { Id = 3, StudentName = "Rajesh" });
studentModels.Add(new StudentModel { Id = 4, StudentName = "Prakash" });
CVStudentData.ItemsSource = studentModels;
private void CVStudentData_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
try
{
}
catch (Exception)
{
}
}