Skip to content

Commit

Permalink
chore: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Oct 16, 2024
1 parent f1a1eeb commit 475fef4
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/Uno.UI/Microsoft/UI/Xaml/Controls/TabView/TabView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1281,27 +1281,17 @@ public object ItemFromContainer(DependencyObject container)

private int GetItemCount()
{
var itemsSource = TabItemsSource;
if (itemsSource != null)
if (TabItemsSource is { } itemsSource)
{
var iterable = itemsSource as IEnumerable;
if (iterable != null)
if (itemsSource is IEnumerable iterable)
{
//int i = 1;
//var iter = iterable.First();
//while (iter.MoveNext())
//{
// i++;
//}
//return i;
return iterable.Count();
}
return 0;
}

else
{
return (int)TabItems.Count;
return TabItems.Count;
}
}

Expand Down

0 comments on commit 475fef4

Please sign in to comment.