Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static ILoopItemsViewSource CreateForCarouselView(IEnumerable itemsSource
IList _ when itemsSource is INotifyCollectionChanged => new LoopObservableItemsSource2(itemsSource as IList, collectionViewController, loop),
IEnumerable _ when itemsSource is INotifyCollectionChanged => new LoopObservableItemsSource2(itemsSource as IEnumerable, collectionViewController, loop),
IEnumerable<object> generic => new LoopListSource2(generic, loop),
_ => new LoopListSource(itemsSource, loop),
_ => new LoopListSource2(itemsSource, loop),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you include a related test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jsuarezruiz, As of now, the test cases are running with CarouselView1 in CI. Once this (#29315 ) PR got merged, I will replace the CarouselView1 to CarouselView2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsuarezruiz , As the PR #29315 has been merged, I have re-enabled the relevant test case. Kindly review and let me know if you have any questions or concerns.

};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@
BackgroundColor="Black"
TextColor="White"
Text="Swipe the CarouselView to select the item numbered 2. Then, tap the Hide Button to hide the Carousel and the Show Button to show the Carousel again. If the position of the Carousel is the same as before hiding, the test has passed."/>
<!-- This functionality failed in CarouselView2. Reference: https://github.com/dotnet/maui/issues/29308 -->
<!-- TODO: Replace CarouselView1 with CarouselView once the issues mentioned in the GitHub issue are resolved. -->
<local:CarouselView1
<CarouselView
AutomationId="TestCarouselView"
x:Name="carousel"
HorizontalOptions="Center"
HeightRequest="500"
ItemsSource="{Binding}">
<local:CarouselView1.ItemTemplate>
<CarouselView.ItemTemplate>
<DataTemplate>
<Label
Text="{Binding}"
FontSize="96"
HorizontalTextAlignment="Center"/>
Text="{Binding}"
FontSize="96"
HorizontalTextAlignment="Center"/>
</DataTemplate>
</local:CarouselView1.ItemTemplate>
</local:CarouselView1>
</CarouselView.ItemTemplate>
</CarouselView>
<Label
AutomationId="CarouselPosition"
Text="{Binding Source={x:Reference carousel}, Path=Position}"
Expand Down
Loading