// This source file is adapted from the WinUI project. // (https://github.com/microsoft/microsoft-ui-xaml) // // Licensed to The Avalonia Project under MIT License, courtesy of The .NET Foundation. using System; using System.Collections.Generic; #nullable enable namespace Avalonia.Controls { public class SelectionModelSelectionChangedEventArgs : EventArgs { public SelectionModelSelectionChangedEventArgs( IReadOnlyList? deselectedIndices, IReadOnlyList? selectedIndices, IReadOnlyList? deselectedItems, IReadOnlyList? selectedItems) { DeselectedIndices = deselectedIndices ?? Array.Empty(); SelectedIndices = selectedIndices ?? Array.Empty(); DeselectedItems = deselectedItems ?? Array.Empty(); SelectedItems= selectedItems ?? Array.Empty(); } /// /// Gets the indices of the items that were removed from the selection. /// public IReadOnlyList DeselectedIndices { get; } /// /// Gets the indices of the items that were added to the selection. /// public IReadOnlyList SelectedIndices { get; } /// /// Gets the items that were removed from the selection. /// public IReadOnlyList DeselectedItems { get; } /// /// Gets the items that were added to the selection. /// public IReadOnlyList SelectedItems { get; } } }