private static ContentControl[] GetPanelChildren(ListViewBase list) { #if __ANDROID__ || __IOS__ return(list.GetItemsPanelChildren().OfType <ContentControl>().ToArray()); #else return(list.ItemsPanelRoot .Children .OfType <ContentControl>() .Where(c => c.Visibility == Visibility.Visible) // Managed ItemsStackPanel currently uses the dirty trick of leaving reyclable items attached to panel and collapsed .ToArray()); #endif }