diff --git a/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.cs b/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.cs index 416d87f8..7240ea24 100644 --- a/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.cs +++ b/components/Collections/src/AdvancedCollectionView/AdvancedCollectionView.cs @@ -3,6 +3,8 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.WinUI.Helpers; +using System; +using System.CodeDom; using System.Collections; using System.Collections.Specialized; using System.Runtime.CompilerServices; @@ -388,7 +390,11 @@ int IComparer.Compare(object x, object y) var listType = _source?.GetType(); Type type; - if (listType != null && listType.IsGenericType) + if (listType == typeof(IncrementalLoadingCollection)) + { + type = listType.GetGenericArguments()[1]; + } + else if (listType != null && listType.IsGenericType) { type = listType.GetGenericArguments()[0]; }