maui
maui copied to clipboard
Problem initializing the CurrentItem for the Carousel
Description
` public partial class SecondPage : ContentPage, IQueryAttributable { public SecondPage() { InitializeComponent(); BindingContext = new ViewModel(); }
public void ApplyQueryAttributes(IDictionary<string, object> query)
{
if (BindingContext is ViewModel model)
{
model.Items = [
"1",
"2",
"3"
];
// Android : works as expected
// iOS: "2" is ignored.
model.CurrentItem = "2";
}
}
`
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iPhone 15 iOS 17.0
Did you find any workaround?
No response
Relevant log output
No response
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Verified this on Visual Studio Enterprise 17.9.0 Preview 2(8.0.3). Repro on iOS 17.0 and MacCatalyst, not repro on Windows 11 and Android 14.0-API34 with below Project: MauiApp2.zip
+1 encountered this too - another Carousel bug. This control is clearly alpha quality.
+1, this makes the carousel near unusable on iOS as I was controlling the visible elements by setting CurrentItem
Potentially related #17283