Skip to content

Commit aa1896f

Browse files
authored
Replace ArrayList in ItemContainerGenerator with List<EmptyGroupItem> (#9432)
* replace ArrayList in ItemContainerGenerator with List<EmptyGroupItem> * use fully qualified type when initializing a new instance
1 parent 78d7e1f commit aa1896f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ItemContainerGenerator.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,8 @@ void AddEmptyGroupItem(CollectionViewGroup group)
20552055

20562056
// add it to the list of placeholder items (this keeps it from being GC'd)
20572057
if (_emptyGroupItems == null)
2058-
_emptyGroupItems = new ArrayList();
2058+
_emptyGroupItems = new List<EmptyGroupItem>();
2059+
20592060
_emptyGroupItems.Add(emptyGroupItem);
20602061
}
20612062

@@ -2792,7 +2793,7 @@ void OnRefresh()
27922793
private ReadOnlyCollection<object> _itemsReadOnly;
27932794
private GroupStyle _groupStyle;
27942795
private ItemContainerGenerator _parent;
2795-
private ArrayList _emptyGroupItems;
2796+
private List<EmptyGroupItem> _emptyGroupItems;
27962797
private int _alternationCount;
27972798

27982799
private Type _containerType; // type of containers on the recycle queue

0 commit comments

Comments
 (0)