Skip to content

April 14th, Candidate#34885

Merged
PureWeen merged 104 commits intomainfrom
inflight/candidate
Apr 29, 2026
Merged

April 14th, Candidate#34885
PureWeen merged 104 commits intomainfrom
inflight/candidate

Conversation

@PureWeen
Copy link
Copy Markdown
Member

@PureWeen PureWeen commented Apr 8, 2026

Blazor

Button

CollectionView

🔧 Fixes

DateTimePicker

Drawing

Editor

Entry

Essentials

Flyoutpage

Gestures

Image

Label

Layout

Map

Modal

Navigation

Picker

RadioButton

SafeArea

ScrollView

Searchbar

SearchBar

Shell

SwipeView

Switch

TabbedPage

Titlebar

WebView

🔧 Fixes

Xaml

🧪 Testing (4)
📦 Other (3)
📝 Issue References

Fixes #5825, Fixes #8494, Fixes #8716, Fixes #10987, Fixes #11404, Fixes #12008, Fixes #18200, Fixes #18551, Fixes #18657, Fixes #18701, Fixes #19168, Fixes #19209, Fixes #20062, Fixes #20348, Fixes #20834, Fixes #20991, Fixes #21983, Fixes #22038, Fixes #22193, Fixes #22197, Fixes #22769, Fixes #23330, Fixes #23854, Fixes #23902, Fixes #23921, Fixes #24304, Fixes #24831, Fixes #25124, Fixes #26059, Fixes #26397, Fixes #26644, Fixes #26846, Fixes #26961, Fixes #26977, Fixes #27086, Fixes #27367, Fixes #27959, Fixes #28337, Fixes #28351, Fixes #28660, Fixes #28975, Fixes #29390, Fixes #29391, Fixes #29463, Fixes #29493, Fixes #29544, Fixes #30052, Fixes #30065, Fixes #30071, Fixes #30144, Fixes #30399, Fixes #30779, Fixes #30803, Fixes #30970, Fixes #31280, Fixes #31446, Fixes #31475, Fixes #31496, Fixes #31565, Fixes #31825, Fixes #31961, Fixes #32048, Fixes #32050, Fixes #32139, Fixes #32356, Fixes #32419, Fixes #32771, Fixes #32944, Fixes #32984, Fixes #32994, Fixes #33308, Fixes #33501, Fixes #33703, Fixes #33770, Fixes #33773, Fixes #34104, Fixes #34256, Fixes #34257, Fixes #34310, Fixes #34322, Fixes #34363, Fixes #34370, Fixes #34459, Fixes #34518, Fixes #34583, Fixes #34591, Fixes #34666, Fixes #34693, Fixes #34720, Fixes #34730

Full Changelog: main...inflight/candidate

Copilot AI review requested due to automatic review settings April 8, 2026 18:32
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34885

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34885"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR appears to be a broad “candidate” batch that adds multiple new HostApp issue repro pages, expands test coverage (device + unit), and includes a set of framework fixes across Controls (VSM specificity, alerts, Shell RTL/FlowDirection, Items handlers, etc.) and BlazorWebView.

Changes:

  • Added many new TestCases.HostApp/Issues/IssueXXXXX pages and some FeatureMatrix UI updates to exercise regressions.
  • Added/updated device tests and unit tests for a number of fixes (Entry long text, RadioButton semantics, Brush transparency, etc.).
  • Implemented multiple framework fixes in Controls/Platform layers (AlertManager DI, VisualStateManager specificity, Shell flow direction/insets, Items handler recycling/selection/empty view, etc.), plus a WebView2 disposal safeguard.

Reviewed changes

Copilot reviewed 159 out of 863 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/Controls/tests/TestCases.HostApp/Issues/Issue34518.cs Adds HostApp repro page for WebView background color override regression.
src/Controls/tests/TestCases.HostApp/Issues/Issue34459.cs Adds HostApp repro page for Android RTL label wrapping/clipping.
src/Controls/tests/TestCases.HostApp/Issues/Issue33308.cs Adds HostApp repro page for iOS CarouselView vertical snap settle behavior.
src/Controls/tests/TestCases.HostApp/Issues/Issue33287.cs Adds HostApp repro pages for delayed DisplayAlertAsync crash.
src/Controls/tests/TestCases.HostApp/Issues/Issue32984.cs Adds HostApp repro page for Windows Picker resize.
src/Controls/tests/TestCases.HostApp/Issues/Issue32419.cs Adds HostApp repro Shell RTL flyout/menu update scenario.
src/Controls/tests/TestCases.HostApp/Issues/Issue32356.xaml.cs Adds HostApp repro for MauiImage LogicalName path on Windows.
src/Controls/tests/TestCases.HostApp/Issues/Issue32356.xaml Adds XAML UI for Issue32356 image loading scenario.
src/Controls/tests/TestCases.HostApp/Issues/Issue32139.cs Adds HostApp repro for invalid CurrentItem with Loop on iOS CarouselView.
src/Controls/tests/TestCases.HostApp/Issues/Issue32050.xaml.cs Adds HostApp repro Shell BackButtonBehavior.IconOverride on iOS.
src/Controls/tests/TestCases.HostApp/Issues/Issue32050.xaml Adds Shell markup for Issue32050.
src/Controls/tests/TestCases.HostApp/Issues/Issue32048.cs Adds HostApp repro for CurrentItemChanged with ItemSpacing (CarouselView2).
src/Controls/tests/TestCases.HostApp/Issues/Issue31825.cs Adds HostApp repro for CollectionView KeepLastItemInView updates.
src/Controls/tests/TestCases.HostApp/Issues/Issue31496.cs Adds HostApp repro for AbsoluteLayout AutoSize reverting.
src/Controls/tests/TestCases.HostApp/Issues/Issue30970.cs Adds HostApp repro for alerts shown on wrong window during modal nav.
src/Controls/tests/TestCases.HostApp/Issues/Issue30803.cs Adds HostApp repro for Graphics IImage.Downsize aspect ratio.
src/Controls/tests/TestCases.HostApp/Issues/Issue30399.cs Adds HostApp repro for TitleBar RTL overlap on Windows.
src/Controls/tests/TestCases.HostApp/Issues/Issue30071.cs Adds HostApp repro for Entry/Editor Placeholder CharacterSpacing on Windows.
src/Controls/tests/TestCases.HostApp/Issues/Issue30065.cs Adds HostApp repro for DatePicker FlowDirection flipping on iOS.
src/Controls/tests/TestCases.HostApp/Issues/Issue29493.cs Adds HostApp repro for Windows SearchHandler API behavior.
src/Controls/tests/TestCases.HostApp/Issues/Issue29391.xaml.cs Adds HostApp repro for CarouselView2 IsSwipeEnabled on iOS/macOS.
src/Controls/tests/TestCases.HostApp/Issues/Issue29391.xaml Adds XAML UI for Issue29391.
src/Controls/tests/TestCases.HostApp/Issues/Issue28975.cs Adds HostApp repro for Entry Keyboard.Date behaving like password on Windows.
src/Controls/tests/TestCases.HostApp/Issues/Issue28660.cs Adds HostApp repro for Label cropping with explicit WidthRequest.
src/Controls/tests/TestCases.HostApp/Issues/Issue27367.cs Adds HostApp repro for Android SwipeView right items visibility.
src/Controls/tests/TestCases.HostApp/Issues/Issue26977.xaml.cs Adds HostApp repro code-behind for VSM + ControlTemplate TargetName crash.
src/Controls/tests/TestCases.HostApp/Issues/Issue26977.xaml Adds XAML repro for Setter.TargetName across namescopes.
src/Controls/tests/TestCases.HostApp/Issues/Issue26846.cs Adds HostApp repro for Android Shell PopToRootAsync modal flashing.
src/Controls/tests/TestCases.HostApp/Issues/Issue25224.xaml.cs Adjusts template selector to handle null item.
src/Controls/tests/TestCases.HostApp/Issues/Issue24831.cs Adds HostApp repro for TitleBar BindingContext propagation.
src/Controls/tests/TestCases.HostApp/Issues/Issue23921.cs Adds HostApp repro ensuring tap-to-close SwipeView doesn’t activate children.
src/Controls/tests/TestCases.HostApp/Issues/Issue23854.cs Adds HostApp repro for ImageButton CornerRadius on Android.
src/Controls/tests/TestCases.HostApp/Issues/Issue22769.cs Adds HostApp repro for Brush.Transparent vs BackgroundColor transparent behavior.
src/Controls/tests/TestCases.HostApp/Issues/Issue22197.xaml.cs Adds HostApp repro code-behind for HTML Label LineHeight.
src/Controls/tests/TestCases.HostApp/Issues/Issue22197.xaml Adds XAML repro for HTML vs plain text LineHeight.
src/Controls/tests/TestCases.HostApp/Issues/Issue22104.xaml Updates styles/VSM setters for label selection visuals.
src/Controls/tests/TestCases.HostApp/Issues/Issue22038.cs Adds HostApp repro for opacity clipping overflow on Android.
src/Controls/tests/TestCases.HostApp/Issues/Issue21983.xaml.cs Adds HostApp repro code-behind for GradientBrush Stroke support.
src/Controls/tests/TestCases.HostApp/Issues/Issue21983.xaml Adds XAML repro for gradient strokes on Shapes.
src/Controls/tests/TestCases.HostApp/Issues/Issue20991.cs Adds HostApp repro for IDrawable binding behavior.
src/Controls/tests/TestCases.HostApp/Issues/Issue20348.cs Adds HostApp repro for SearchBar text copying after back nav on Android.
src/Controls/tests/TestCases.HostApp/Issues/Issue20062.cs Adds HostApp repro for CollectionView Selected visual states on Android.
src/Controls/tests/TestCases.HostApp/Issues/Issue19168.cs Adds HostApp repro for iOS picker dismissal behavior.
src/Controls/tests/TestCases.HostApp/Issues/Issue18657.cs Adds HostApp repro for CollectionView.EmptyView remove by null on Windows.
src/Controls/tests/TestCases.HostApp/Issues/Issue18200.cs Adds HostApp repro for Windows FlyoutPage collapse style changes.
src/Controls/tests/TestCases.HostApp/Issues/Issue11404.cs Adds HostApp repro for Shape line coordinate symmetry.
src/Controls/tests/TestCases.HostApp/Issues/Issue10987.cs Adds HostApp repro for Editor HorizontalTextAlignment behavior.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Slider/SliderViewModal.cs Adds VM properties to track Slider ValueChanged results.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Slider/SliderControlPage.xaml.cs Hooks Slider.ValueChanged and updates VM fields.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/ScrollView/ScrollViewViewModel.cs Adds VM state to reflect ScrollToRequested event details.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/ScrollView/ScrollViewControlPage.xaml.cs Wires ScrollToRequested handler and scroll-to-pixel helper.
src/Controls/tests/TestCases.HostApp/FeatureMatrix/ScrollView/ScrollViewControlPage.xaml Adds UI to display ScrollToRequested event metadata.
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj Adds MauiImage LogicalName mapping for Challenges images.
src/Controls/tests/DeviceTests/Elements/RadioButton/RadioButtonTests.cs Adds device tests for templated RadioButton semantics description behavior.
src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.cs Adds long-text Entry regression tests and MaxLength/Text ordering test.
src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.iOS.cs Adds iOS test for Editor placeholder horizontal alignment mapping.
src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.iOS.cs Adds iOS test for CarouselView scroll indicator visibility updates.
src/Controls/tests/DeviceTests/Elements/CarouselView/CarouselViewTests.cs Enables DisconnectedCarouselView test on Android (removes guard).
src/Controls/tests/DeviceTests/Elements/CarouselView/CarouselViewTests.Android.cs Adds Android accessibility test for IndicatorView content descriptions.
src/Controls/tests/Core.UnitTests/SolidColorBrushTests.cs Adds unit test coverage for Brush.HasTransparency (SolidColorBrush).
src/Controls/tests/Core.UnitTests/RadialGradientBrushTests.cs Adds unit test coverage for Brush.HasTransparency (RadialGradientBrush).
src/Controls/tests/Core.UnitTests/LinearGradientBrushTests.cs Adds unit test coverage for Brush.HasTransparency (LinearGradientBrush).
src/Controls/tests/Core.UnitTests/BindablePropertyUnitTests.cs Adds unit test for unwrapping OnPlatform in CollectionView.Header.
src/Controls/src/Core/Window/Window.cs Switches AlertManager field to DI-resolvable IAlertManager and manages subscriptions.
src/Controls/src/Core/VisualStateManager.cs Adjusts VSM setter specificity promotion behavior for system-driven states.
src/Controls/src/Core/VisualElement/VisualElement.cs Exposes internal IsExplicitlyEnabled and adjusts Loaded/Unloaded wiring conditions.
src/Controls/src/Core/VisualElement/VisualElement.Platform.cs Ensures Loaded/Unloaded can fire when hosted via native container (ToPlatform).
src/Controls/src/Core/Style.cs Ensures BasedOn style updates unapply/reapply base style correctly.
src/Controls/src/Core/Shell/ShellItem.cs Allows TabBarIsVisible to be resolved from ShellContent with priority.
src/Controls/src/Core/Shell/ShellElementCollection.cs Propagates dynamic ShellContent TabBarIsVisible to displayed page.
src/Controls/src/Core/Shapes/Shape.cs Improves translation logic for Stretch.None to keep paths in bounds.
src/Controls/src/Core/SetterSpecificity.cs Adds masks/constants and helper to promote implicit VSM specificity.
src/Controls/src/Core/Setter.cs Improves TargetName lookup across namescopes (ControlTemplate boundaries).
src/Controls/src/Core/RadioButton/RadioButton.cs Improves semantics description derivation for templated content.
src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt Records new public API surface changes for netstandard pack.
src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt Records new public API surface changes for net pack.
src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt Records new public API surface changes for Windows pack.
src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt Records new public API surface changes for Tizen pack.
src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt Records new public API surface changes for MacCatalyst pack.
src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt Records new public API surface changes for iOS pack.
src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt Records new public API surface changes for Android pack.
src/Controls/src/Core/PlatformConfiguration/WindowsSpecific/FlyoutPage.cs Adds property-changed hook to update handler when CollapseStyle changes.
src/Controls/src/Core/Platform/iOS/ControlsModalWrapper.cs Uses brush transparency to select correct modal presentation style.
src/Controls/src/Core/Platform/Windows/CollectionView/ItemContentControl.cs Fixes logical tree reattachment and equality selection comparisons.
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs Prevents modal flash on batch pop and forwards touch events for keyboard dismissal.
src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.Android.cs Adds RecyclerView touch listener path for reliable gesture delivery.
src/Controls/src/Core/Platform/AlertManager/IAlertManagerSubscription.cs Introduces public subscription interface for alert request backends.
src/Controls/src/Core/Platform/AlertManager/IAlertManager.cs Introduces public alert manager interface for DI replacement.
src/Controls/src/Core/Platform/AlertManager/AlertManager.cs Implements IAlertManager and moves subscription interface out.
src/Controls/src/Core/Label/Label.iOS.cs Ensures formatting changes update line height/decorations/char spacing.
src/Controls/src/Core/Label/Label.cs Forces measure invalidation when text emptiness transitions.
src/Controls/src/Core/Label/Label.Mapper.cs Avoids mapping for formatted spans using HasFormattedTextSpans.
src/Controls/src/Core/Items/MarshalingObservableCollection.cs Uses weak proxy and adds disposal hook.
src/Controls/src/Core/Handlers/Items2/iOS/StructuredItemsViewController2.cs Updates header/footer flow direction for default supplementary cells.
src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewDelegator2.cs Uses shared reorder helper for grouped move logic.
src/Controls/src/Core/Handlers/Items2/iOS/ItemsViewController2.cs Updates flow direction propagation across logical children/default cells.
src/Controls/src/Core/Handlers/Items2/CarouselViewHandler2.iOS.cs Fixes controller cast and updates swipe enable logic for compositional layout.
src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewExtensions.cs Adds shared helper for grouped reorder target resolution.
src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewDelegator.cs Uses shared helper for grouped move logic.
src/Controls/src/Core/Handlers/Items/iOS/MauiCollectionView.cs Ensures swipe enabled affects internal orthogonal UIScrollView.
src/Controls/src/Core/Handlers/Items/iOS/CarouselViewController.cs Adds guards for invalid indexes and empty ItemsSource during scroll.
src/Controls/src/Core/Handlers/Items/StructuredItemsViewHandler.Windows.cs Cleans up header/footer elements when replaced.
src/Controls/src/Core/Handlers/Items/SelectableItemsViewHandler.Windows.cs Uses object.Equals for selected item comparisons.
src/Controls/src/Core/Handlers/Items/ItemsViewHandler.Windows.cs Refactors empty view removal and improves empty view template realization.
src/Controls/src/Core/Handlers/Items/CarouselViewHandler.Windows.cs Adjusts scroll/selection bookkeeping to avoid intermediate update effects.
src/Controls/src/Core/Handlers/Items/Android/SimpleItemTouchHelperCallback.cs Adjusts reorder move blocking based on source view type.
src/Controls/src/Core/Handlers/Items/Android/MauiRecyclerView.cs Uses IsExplicitlyEnabled to avoid blocking touches inherited from disabled parent.
src/Controls/src/Core/Handlers/Items/Android/MauiCarouselRecyclerView.cs Adjusts goto position tracking on scroll-to requests.
src/Controls/src/Core/Handlers/Items/Android/ItemsSources/ObservableItemsSource.cs Adds optional disposal path for wrapped items sources.
src/Controls/src/Core/Handlers/Items/Android/ItemsSources/ItemsSourceFactory.cs Disposes MarshalingObservableCollection via ObservableItemsSource.
src/Controls/src/Core/Handlers/Items/Android/Adapters/SelectableItemsViewAdapter.cs Forces visual selection sync in Single mode for value-equal items.
src/Controls/src/Core/Handlers/Items/Android/Adapters/ReorderableItemsViewAdapter.cs Adds bounds checks for grouped move indices.
src/Controls/src/Core/GraphicsView/GraphicsView.cs Propagates BindingContext to bindable IDrawable and updates on set.
src/Controls/src/Core/FlyoutPage/FlyoutPage.Mapper.cs Adds Windows mapping for FlyoutPage CollapseStyle handling.
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/SlideFlyoutTransition.cs Fixes RTL flyout positioning for Locked behavior.
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellTableViewSource.cs Resolves MatchParent FlowDirection for shell menu item cells.
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRootRenderer.cs Resolves MatchParent FlowDirection for tracked page in shell section.
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs Applies flow direction updates to TabBar native view.
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs Fixes visibility bookkeeping when page assignment happens pre-animation.
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutHeaderContainer.cs Implements measure invalidation controller for header sizing.
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutContentRenderer.cs Updates flow direction for footer and resolves header MatchParent.
src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellToolbarTracker.cs Fixes icon selection and clears search UI state on handler swap.
src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRenderer.cs Requests insets after TabBar Gone→Visible to fix stale padding.
src/Controls/src/Core/Brush/Brush.cs Adds internal Brush.HasTransparency helper for modal/background logic.
src/Controls/src/Core/BindableProperty.cs Avoids treating IWrappedValue as already-assignable in conversion.
src/Controls/Maps/src/AppHostBuilderExtensions.cs Updates MauiMaps handler registration and Windows documentation.
src/BlazorWebView/src/Wpf/BlazorWebView.cs Marks WebView manager as disposing prior to async disposal.
src/BlazorWebView/src/SharedSource/WebView2WebViewManager.cs Guards SendMessage during disposal/initialization to avoid COM exceptions.
src/BlazorWebView/src/Maui/build/Microsoft.AspNetCore.Components.WebView.Maui.targets Filters compressed assets when CompressionEnabled=false.
src/AI/src/Essentials.AI/PublicAPI/net-macos/PublicAPI.Unshipped.txt Moves AI public APIs from Unshipped to Shipped for macOS.
src/AI/src/Essentials.AI/PublicAPI/net-macos/PublicAPI.Shipped.txt Adds AI public APIs to Shipped (macOS) with diagnostic ID.
src/AI/src/Essentials.AI/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt Moves AI public APIs from Unshipped to Shipped for MacCatalyst.
src/AI/src/Essentials.AI/PublicAPI/net-maccatalyst/PublicAPI.Shipped.txt Adds AI public APIs to Shipped (MacCatalyst) with diagnostic ID.
src/AI/src/Essentials.AI/PublicAPI/net-ios/PublicAPI.Unshipped.txt Moves AI public APIs from Unshipped to Shipped for iOS.
src/AI/src/Essentials.AI/PublicAPI/net-ios/PublicAPI.Shipped.txt Adds AI public APIs to Shipped (iOS) with diagnostic ID.
eng/Versions.props Bumps MonoApiTools MSBuild tasks package version.

Comment on lines +344 to +346
internal IAlertManager AlertManager { get; private set; }

bool _alertManagerResolved;
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

The PR title (“April 14th, Candidate”) doesn’t describe the scope of changes (new public alert manager interfaces, VSM specificity changes, Shell/Items handler fixes, new tests, etc.). This makes it hard to review/triage and can impact release notes/changelog generation. Please update the PR title/description to explicitly list the main framework areas and key issue numbers being fixed.

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +4
[Issue(IssueTracker.Github, 34518, "WebView background color has changed after update, can't override", PlatformAffected.UWP)]
public class Issue34518 : ContentPage
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This PR adds many new HostApp Issue pages, but I don’t see corresponding Appium NUnit tests in src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/ for these new IssueXXXXX scenarios. Per repo UI testing guidelines, each Issue page intended for automation should have a matching _IssuesUITest test using the provided AutomationIds; otherwise regressions won’t be caught by CI.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +209 to +222
DeviceInfo.SetCurrent(new MockDeviceInfo { Platform = platform });

var header = new OnPlatform<View>();
header.Platforms.Add(new On { Platform = new[] { "iOS" }, Value = new Label { Text = "iOS Header" } });
header.Platforms.Add(new On { Platform = new[] { "Android" }, Value = new Label { Text = "Android Header" } });
header.Platforms.Add(new On { Platform = new[] { "WinUI" }, Value = new Label { Text = "WinUI Header" } });

var collectionView = new CollectionView
{
Header = header
};

var resolvedHeader = Assert.IsType<Label>(collectionView.Header);
Assert.Equal(expectedText, resolvedHeader.Text);
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

DeviceInfo.SetCurrent(...) mutates global process state and the test does not restore the previous value. This can leak into subsequent unit tests and cause order-dependent failures. Please capture the original DeviceInfo.Current and restore it in a try/finally (or equivalent teardown).

Suggested change
DeviceInfo.SetCurrent(new MockDeviceInfo { Platform = platform });
var header = new OnPlatform<View>();
header.Platforms.Add(new On { Platform = new[] { "iOS" }, Value = new Label { Text = "iOS Header" } });
header.Platforms.Add(new On { Platform = new[] { "Android" }, Value = new Label { Text = "Android Header" } });
header.Platforms.Add(new On { Platform = new[] { "WinUI" }, Value = new Label { Text = "WinUI Header" } });
var collectionView = new CollectionView
{
Header = header
};
var resolvedHeader = Assert.IsType<Label>(collectionView.Header);
Assert.Equal(expectedText, resolvedHeader.Text);
var originalDeviceInfo = DeviceInfo.Current;
DeviceInfo.SetCurrent(new MockDeviceInfo { Platform = platform });
try
{
var header = new OnPlatform<View>();
header.Platforms.Add(new On { Platform = new[] { "iOS" }, Value = new Label { Text = "iOS Header" } });
header.Platforms.Add(new On { Platform = new[] { "Android" }, Value = new Label { Text = "Android Header" } });
header.Platforms.Add(new On { Platform = new[] { "WinUI" }, Value = new Label { Text = "WinUI Header" } });
var collectionView = new CollectionView
{
Header = header
};
var resolvedHeader = Assert.IsType<Label>(collectionView.Header);
Assert.Equal(expectedText, resolvedHeader.Text);
}
finally
{
DeviceInfo.SetCurrent(originalDeviceInfo);
}

Copilot uses AI. Check for mistakes.

if (!string.IsNullOrEmpty(TargetName) && target is Element element)
targetObject = element.FindByName(TargetName) as BindableObject ?? throw new ArgumentNullException(nameof(targetObject));
targetObject = FindTargetByName(element, TargetName) ?? throw new ArgumentNullException(nameof(targetObject));
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

When TargetName cannot be resolved during UnApply, the code now throws ArgumentNullException(nameof(targetObject)), which is misleading and drops the actual TargetName causing the problem. This should mirror Apply and throw a XamlParseException (or at minimum an exception message including the unresolved name) so template/VSM failures are diagnosable.

Suggested change
targetObject = FindTargetByName(element, TargetName) ?? throw new ArgumentNullException(nameof(targetObject));
targetObject = FindTargetByName(element, TargetName) ?? throw new XamlParseException($"Cannot resolve '{TargetName}' as Setter Target for '{target}'.");

Copilot uses AI. Check for mistakes.

return RealizeEmptyView(view);
var template = emptyViewTemplate.SelectDataTemplate(bindingContext, ItemsView);
var templatedElement = template.CreateContent() as View;
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

template.CreateContent() is cast to View without a null-check. If a template returns a non-View (or returns null), this will throw via templatedElement.BindingContext = ... and can crash at runtime. Please add a defensive fallback (e.g., create a default TextBlock/Label using bindingContext?.ToString()), or validate/throw a targeted exception with context.

Suggested change
var templatedElement = template.CreateContent() as View;
if (template == null)
{
throw new InvalidOperationException("The empty view template selector returned null.");
}
var content = template.CreateContent();
if (content == null)
{
throw new InvalidOperationException($"The empty view template '{template.GetType().FullName}' returned null content.");
}
if (content is not View templatedElement)
{
throw new InvalidOperationException($"The empty view template '{template.GetType().FullName}' must create a '{typeof(View).FullName}', but created '{content.GetType().FullName}'.");
}

Copilot uses AI. Check for mistakes.

await CreateHandlerAndAddToWindow<CarouselViewHandler2>(carouselView, async handler =>
{
await Task.Delay(100); // Allow layout to complete
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This test relies on multiple fixed Task.Delay calls and polling loops, which tends to be flaky on slower CI devices/simulators. Prefer using an AssertEventually/retry helper (with a reasonable timeout) to wait for the internal scroll view and for indicator visibility changes to apply, instead of hard-coded sleeps.

Copilot uses AI. Check for mistakes.
// Test ScrollBarVisibility.Always
carouselView.HorizontalScrollBarVisibility = ScrollBarVisibility.Always;
carouselView.VerticalScrollBarVisibility = ScrollBarVisibility.Always;
await Task.Delay(100); // Allow BeginInvokeOnMainThread callbacks to drain
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This test relies on multiple fixed Task.Delay calls and polling loops, which tends to be flaky on slower CI devices/simulators. Prefer using an AssertEventually/retry helper (with a reasonable timeout) to wait for the internal scroll view and for indicator visibility changes to apply, instead of hard-coded sleeps.

Copilot uses AI. Check for mistakes.
Comment on lines +422 to +427
for (int attempt = 0; attempt < 10 && internalScrollView == null; attempt++)
{
internalScrollView = FindInternalScrollView(nativeCollectionView);
if (internalScrollView == null)
await Task.Delay(100);
}
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This test relies on multiple fixed Task.Delay calls and polling loops, which tends to be flaky on slower CI devices/simulators. Prefer using an AssertEventually/retry helper (with a reasonable timeout) to wait for the internal scroll view and for indicator visibility changes to apply, instead of hard-coded sleeps.

Copilot uses AI. Check for mistakes.
Comment on lines +268 to +277
var handler = await CreateHandlerAsync<EntryHandler>(entry);
#if !ANDROID
await InvokeOnMainThreadAsync(() =>
{
SetPlatformText(handler, "short");
});
#else
SetPlatformText(handler, "short");
#endif
Assert.Equal("short", await GetPlatformText(handler));
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This introduces platform-specific compilation inside the test body and updates the platform control text differently per platform. For consistency and to avoid thread-affinity issues, consider always setting platform text on the UI thread (or via a single cross-platform helper) and remove the inline #if branches so the test logic is uniform and easier to maintain.

Copilot uses AI. Check for mistakes.
kubaflo pushed a commit that referenced this pull request Apr 9, 2026
This pull request updates the Windows-specific handler in
`Issue34310.cs` to use an alias (`WGrid`) for
`Microsoft.UI.Xaml.Controls.Grid`, improving code clarity and
consistency across the file.

**Windows handler type aliasing and usage:**

* Introduced the `WGrid` alias for `Microsoft.UI.Xaml.Controls.Grid` to
clarify platform-specific usage and replaced all direct references to
`Grid` with `WGrid` in the Windows handler
(`Issue34310NativeHostViewHandler`).
[[1]](diffhunk://#diff-08c1725ba487aaecb24e2638d9a9767cfeaf27b0e1af0100a3ebdcfe876d2d18L9-R9)
[[2]](diffhunk://#diff-08c1725ba487aaecb24e2638d9a9767cfeaf27b0e1af0100a3ebdcfe876d2d18L220-R220)
[[3]](diffhunk://#diff-08c1725ba487aaecb24e2638d9a9767cfeaf27b0e1af0100a3ebdcfe876d2d18L233-R242)

Candidate PR:
#34885
kubaflo pushed a commit that referenced this pull request Apr 13, 2026
I have addressed the UI test image failures in this PR
#34885 by adding base images and
re-saving the necessary UI test images.

Re-saved the Material3FeatureTests, SliderFeatureTests
Added the Mac, iOS,Android and Windows base images.
@PureWeen PureWeen added this to the .NET 10 SR7 milestone Apr 14, 2026
kubaflo pushed a commit that referenced this pull request Apr 20, 2026
…4959)

This pull request updates test cases for carousel and label tap behavior
to improve reliability and accuracy. The main changes include improving
tap detection in label tests, updating the carousel view bounce test to
use a new button for navigation, and adding a new UI element to the
carousel view test page.

**Test improvements:**

* In the label tap test (`Issue21837.cs`), taps are now performed at
specific coordinates near the leading edge of each label's text to
ensure accurate hit detection, especially when label widths exceed the
rendered text width.

**Carousel view test updates:**

* The carousel bounce test (`Issue29261.cs`) now uses a newly added "Go
to Last" button to reliably set the carousel to the last position before
testing bounce behavior, replacing multiple swipe actions with a button
tap and scroll gestures.
* The test page for the carousel view (`Issue29261.cs`) adds a "Go to
Last" button (`goToLastButton`) to facilitate direct navigation to the
last carousel item.

**Test cleanup:**

* Removes unnecessary conditional compilation and comments related to
unsupported swipe actions on Catalyst, simplifying test code.

**Test image resaving:**
* Resaved the valid images on the Android, iOS and macOS platforms

**Fixes:** #34885

---------

Co-authored-by: NafeelaNazhir <nafeela.nazhirhussain@syncfusion.com>
Co-authored-by: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com>
Co-authored-by: HarishKumarSF4517 <harish.kumar@syncfusion.com>
Co-authored-by: Subhiksha Chandrasekaran <subhiksha.c@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests , maui-pr-devicetests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

KarthikRajaKalaimani and others added 4 commits April 22, 2026 12:02
)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details:

Horizontalspacing / Verticalspacing is not not applied to the first
column in GridItemLayout using CollectionView on Android platform.
        
### Root Cause:

The grid spacing was not being distributed symmetrically across the
active layout implementations, so edge items did not fully participate
when spacing changed at runtime.

### Description of Change:

- On Android, the fix in MauiRecyclerView.cs changes how RecyclerView
padding is handled for GridItemsLayout. Android was already using
SpacingItemDecoration, which applies half-spacing on all four sides of
each item. Previously, negative RecyclerView padding canceled that
spacing at the control edges. The branch keeps that negative-padding
behavior for non-grid layouts, but disables it for GridItemsLayout,
allowing the grid’s half-spacing to remain visible at the outer
perimeter. This makes the first row and first column visually respond
when spacing changes, but it also changes the grid behavior from spacing
only between items to spacing around the outside edges as well.

**Tested the behavior in the following platforms:**

- [x] Android
- [x] Windows
- [ ] iOS
- [ ] Mac

### Reference:

N/A

### Issues Fixed:

Fixes  #34257      

### Screenshots
| Before  | After  |
|---------|--------|
| <Video
src="https://github.com/user-attachments/assets/578dda69-1d60-474c-a6d8-23b3f9d29a50"
Width="300" Height="600"> | <Video
src="https://github.com/user-attachments/assets/7f3826e6-5922-4b6f-a6b9-de581b7db6c3"
Width="300" Height="600"> |
### Description of Change

Compare collection items with value equality

### Issues Fixed

Fixes: #33487

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
…crollView (#34352)

> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

This PR enhances the event handling support for multiple MAUI controls
by adding comprehensive implementation and validation for
control-specific events, along with corresponding test coverage.

The update includes the addition of events for Slider and ScrollView
controls, ensuring proper event triggering and argument handling across
different platforms.
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issues Fixed

Fixes #23854

|Before|After|
|--|--|
|<img
src="https://github.com/user-attachments/assets/104904bd-180d-44a0-ad91-51c83611af60"
width="300px"/>|<img
src="https://github.com/user-attachments/assets/b838132f-a3cf-4bf8-8e2b-641a9c1b55d4"
width="300px"/>|
BagavathiPerumal and others added 20 commits April 22, 2026 12:08
…late is applied (#33208)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Root Cause:

The issue occurs because VisualStateManager setters with TargetName rely
on FindByName(), which only resolves elements within the same namescope.
Since ControlTemplates create a new namescope, visual states defined
inside a template cannot access elements outside it, resulting in the
crash: "Cannot resolve [TargetName] as Setter Target."

### Fix Description:

The fix involves using element.FindByName() for targets within the same
or child namescopes and, if the target is not found, traversing the
parent hierarchy to inspect each parent element’s namescope. This
approach enables elements defined within a control template to resolve a
TargetName outside their own namescope, ensuring reliable target
resolution while maintaining compatibility with existing visual state
behavior.

### Issues Fixed
Fixes #26977

### Tested the behaviour in the following platforms
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac

### Output Screenshot
Before Issue Fix | After Issue Fix |
|----------|----------|
|<video width="100" height="100" alt="Before Fix"
src="https://github.com/user-attachments/assets/e21f3ba7-65e0-4c1e-b732-1f4180db3f86">|<video
width="100" height="100" alt="After Fix"
src="https://github.com/user-attachments/assets/68e00f98-e45e-4eec-8157-58e2be5596df">|

---------
…empty text transition (#34812)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Context

This is a retarget of #34698 from `inflight/candidate` to
`inflight/current`. The candidate branch has already been stabilized and
merging additional changes there could introduce new test failures.

### Issue Details
- When a Label is initialized with LineBreakMode="TailTruncation" and
its Text is null or empty during the first render, later updates to the
Text property do not render any visible text on iOS. The label remains
visually empty even though the Text value changes successfully.

### Root Cause
- **Regression**: Introduced by PR #28931
- PR #28931 introduced ComputeConstraintForView on several layouts,
which causes a Label with default HorizontalOptions = Fill (e.g., inside
a VerticalStackLayout) to be marked as HorizontallyFixed. This activates
an existing optimization in TextChangedShouldInvalidateMeasure that
skips InvalidateMeasureInternal for labels that are both single-line and
horizontally fixed.
- This optimization is valid for typical text changes (e.g., "Hello" →
"World") where the height remains unchanged. However, it fails for the
empty → non-empty transition. When a label initially has null/empty
text, iOS measures it with a height of 0, and MAUI caches this value.
When text is later assigned, the optimization prevents re-measurement,
leaving the stale 0-height intact—resulting in the label being invisible
despite having text.

### Description of Change
- Updated OnTextPropertyChanged in Label.cs to always invalidate measure
when the label's text transitions between empty and non-empty, ensuring
the label is properly rendered and sized in scenarios like
TailTruncation.

### Issues Fixed
Fixes #34591

### Original PR
Cherry-pick of #34698 by @SyedAbdulAzeemSF4852

Co-authored-by: SyedAbdulAzeemSF4852 <184361905+SyedAbdulAzeemSF4852@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This pull request updates the Windows-specific handler in
`Issue34310.cs` to use an alias (`WGrid`) for
`Microsoft.UI.Xaml.Controls.Grid`, improving code clarity and
consistency across the file.

**Windows handler type aliasing and usage:**

* Introduced the `WGrid` alias for `Microsoft.UI.Xaml.Controls.Grid` to
clarify platform-specific usage and replaced all direct references to
`Grid` with `WGrid` in the Windows handler
(`Issue34310NativeHostViewHandler`).
[[1]](diffhunk://#diff-08c1725ba487aaecb24e2638d9a9767cfeaf27b0e1af0100a3ebdcfe876d2d18L9-R9)
[[2]](diffhunk://#diff-08c1725ba487aaecb24e2638d9a9767cfeaf27b0e1af0100a3ebdcfe876d2d18L220-R220)
[[3]](diffhunk://#diff-08c1725ba487aaecb24e2638d9a9767cfeaf27b0e1af0100a3ebdcfe876d2d18L233-R242)

Candidate PR:
#34885
…ment, CollectionViewSelectionShouldClear, SelectedItemVisualIsCleared UI test failure on Android (#34928)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details:

The UI test case's VerifySelectedItemClearsOnNullAssignment,
CollectionViewSelectionShouldClear, SelectedItemVisualIsCleared failed
on android platform
       
### Root Cause:

The test case fails because the selection is still being applied when
the collectionView.SelectedItem property is set to null during the
SelectionChanged event.

### Description of Change:

Added a condition to prevent applying selection when SelectedItem is
null.

**Tested the behavior in the following platforms:**

- [x] Android
- [ ] Windows
- [ ] iOS
- [ ] Mac    

### Screenshots
After
<img width="800" height="374" alt="image"
src="https://github.com/user-attachments/assets/7b8b80bb-3813-4cac-9c3a-9fd59fa6a297"
/>
<img width="998" height="518" alt="image"
src="https://github.com/user-attachments/assets/a46bc0c7-9608-4f1a-a329-830e5e3c124d"
/>
<img width="926" height="544" alt="image"
src="https://github.com/user-attachments/assets/6fd1f053-9298-4457-8b6d-2a9ca2c47369"
/>
I have addressed the UI test image failures in this PR
#34885 by adding base images and
re-saving the necessary UI test images.

Re-saved the Material3FeatureTests, SliderFeatureTests
Added the Mac, iOS,Android and Windows base images.
…4938)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Description of Change

This pull request updates the
`CursorPositionUpdatesWhenSearchBarGainsFocus` test in
`SearchBarHandlerTests.iOS.cs` to improve cross-platform reliability and
clarify the focus behavior. The test now explicitly sets the cursor
position to the end of the text to simulate user interaction, ensuring
consistent results on both iOS and Mac Catalyst. Additionally, an unused
static import was removed for code cleanliness.

Test reliability and clarity improvements:

* The test now explicitly sets the cursor to the end of the text after
focusing the `SearchBar`, ensuring consistent behavior across iOS and
Mac Catalyst platforms. This simulates the user tapping the search bar
and addresses differences in how `DidChangeSelection` is fired.

Code cleanup:

* Removed an unused static import of `AssertHelpers` from the test file.
…lectionViewUpdating (#34947)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Root Cause

- PR #32141 added an early-exit guard in CollectionViewUpdating that
returned when currentItemPosition == -1, but -1 is the expected signal
from GetIndexForItem indicating the current item was just removed —
exiting early prevented GetPositionWhenRemovingItems from running,
leaving _positionAfterUpdate stale.

### Description of Change
- Removed the early-exit guard on currentItemPosition < 0 in
CollectionViewUpdating in both CarouselViewController.cs and
CarouselViewController2.cs, allowing the -1 value to flow through to
GetPositionWhenRemovingItems which correctly interprets it as "the
current item was removed" and calculates the right position to navigate
to.


### Issues Fixed

- Regression introduced by PR #32141 
- **Resolved test case** : Issue12574Test UI Test

### Output
| Before | After |
|----------|----------|
| <img
src="https://github.com/user-attachments/assets/3542d8f6-c525-4e76-994d-500a3af892f2">
| <img
src="https://github.com/user-attachments/assets/292649b3-d71d-46c7-ad79-6d09070bba03">
|
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

Fixes the `FlyoutHeaderScroll` device test regression introduced by PR

After PR #28713 added `IPlatformMeasureInvalidationController` to
`ShellFlyoutHeaderContainer`, the header height after scrolling may
include the safe area margin (~44px) depending on the content type. This
is correct behavior — `InvalidateMeasure` properly re-measures the
header container including its safe area margin.

**Changes (test only, no core code changes):**
- Height assertion: accept header height between `headerRequestedHeight`
and `headerRequestedHeight + safeAreaTop` (accommodates both ShellItems
which don't trigger `OnScrolled`, and CollectionView/ScrollView which
do)
- Scroll position assertion: use `scrolledBox.Height` instead of
hardcoded `headerRequestedHeight`, making it self-consistent with the
actual measured height
- Fix typos in assertion messages

Fixes FlyoutHeaderScroll device test regression from #28713

---------
### Description of Change

Fixes the `FlyoutHeaderScroll` device test regression introduced by PR
#28713.

After PR #28713 added `IPlatformMeasureInvalidationController` to
`ShellFlyoutHeaderContainer`, the header height after scrolling may
include the safe area margin (~44px) depending on the content type.

**Changes (test only, no core code changes):**
- Height assertion: accept header height between `headerRequestedHeight`
and `headerRequestedHeight + safeAreaTop`
- Scroll position assertion: use `scrolledBox.Height` instead of
hardcoded `headerRequestedHeight`
- Fix typos in assertion messages

### Issues Fixed

Fixes FlyoutHeaderScroll device test regression from #28713

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…for HTML labels (#34934) (#34951)

### Description of Change

Ports the test fix from PR #34934 (inflight/current) to
inflight/candidate.

PR #31202 changed the Label mapper conditions from `!IsPlainText(label)`
to `label.HasFormattedTextSpans` for `MapLineHeight`,
`MapTextDecorations`, and `MapCharacterSpacing`. This correctly enables
these properties to be applied to HTML labels.

However, the test expectations for `label4` (an HTML label with
`CharacterSpacing=5`, `LineHeight=1.5`, `TextDecorations=Underline`)
were not updated.

**Fix:** Update expected values for label4 from `(0, 0, None)` to `(5,
1.5, Underline)`.

### Issues Fixed

Fixes CharacterSpacingWithLineHeightWithTextDecorationsWorksCorrectly
device test regression from #31202

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…on candidate branch (#34996)

<!-- Please let the below note in for people that find this PR -->
   > [!NOTE]
   > Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
  Thank you!
 
### Root Cause
During CarouselView startup on Android, `UpdateFromPosition` runs before
the carousel is fully initialized (`_initialized = false`). It sets
`_gotoPosition` during an initial scroll attempt, but since the layout
is not ready, the scroll never completes. This leaves `_gotoPosition`
stuck at a non-negative value.

Earlier, this was unintentionally handled by an unconditional
`_gotoPosition = -1` in `UpdateFromCurrentItem`, which cleared the stale
state. PR #34570 removed that line (to avoid breaking the guard during
animations for #29544), exposing the issue.

As a result, `_gotoPosition` remains stuck, causing all subsequent
`UpdateFromPosition` calls to fail the `_gotoPosition == -1` check and
skip scrolling. This leads to timeouts in tests like `Issue23291` and
`Issue29216`, as the carousel never moves to the requested position.
 
### Description of Change
Updated the guard condition in `UpdateFromPosition` by applying the
`_initialized` check only to the `_gotoPosition` assignment, ensuring it
is set only after initialization while leaving the rest of the logic
unaffected.
This prevents premature or stale `_gotoPosition` values during startup
and preserves the existing scroll behavior, keeping the change safe.

 
### Issues Fixed
Fixes regression introduced by #34570 : 
`Issue23291Test`
`Issue29216CarouselViewScrollingIssue  on Candidate branch`.
 
Tested the behaviour in the following platforms
- [x] Android
- [ ] Windows
- [ ] iOS
- [ ] Mac
…ps test failure regression (#35000)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Description

Fixes a regression introduced by PR #31867, where all grouped
CollectionView drag-and-drop reorder tests fail on Android — most
visibly `VerifyFlowDirectionRTLCanReorderItemsTrueWithCanMixGroups`.

### Root cause

PR #31867 changed SimpleItemTouchHelperCallback.OnMove from checking the
target view type to checking the source view type, so that items can be
dropped onto empty group headers. The side effect: OnItemMove can now be
called with a non-empty group's GroupHeader as toPosition.

When dragging an item forward past the next group's header (e.g.,
"Banana" toward "Potato"), OnItemMove fires with the GroupHeader as
target and prematurely inserts the item mid-gesture, before the drop is
intentional.

LTR tests pass accidentally — the premature insertion moves the item
downward, so the newY > initialY assertion coincidentally passes.
RTL test fails — the mid-gesture NotifyItemMoved causes a layout pass
that makes ItemTouchHelper's internal gesture offset stale in RTL
coordinate space, aborting the drag and leaving newY == initialY.


### Description of Change
Added a guard in `ReorderableItemsViewAdapter.OnItemMove:` when the drag
targets a non-empty group's header (toIndex == 0, HasHeader == true,
Count > 0), return false immediately — no data mutation, drag continues
cleanly. Empty group headers are still allowed as drop targets,
preserving the original PR #31867 intent.


### Issues Fixed

- Regression introduced by PR #31867
- **Resolved test case:**
VerifyFlowDirectionRTLCanReorderItemsTrueWithCanMixGroups

### Output
| Before | After |
|----------|----------|
| <img
src="https://github.com/user-attachments/assets/e61cb83d-d631-4a75-9715-85366cad9593">
| <img
src="https://github.com/user-attachments/assets/9f10fd8b-f173-426d-ae54-79daa82beb56">|
…ndidate branch (#35013)

<!-- Please let the below note in for people that find this PR -->
   > [!NOTE]
   > Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
  Thank you!
 
### Root Cause
Applying `ClipBounds = Rect(0, 0, width, height)` constrained the
WebView strictly to its layout bounds, preventing shadows (rendered by
the parent `WrapperView`) from drawing outside the view. This clipped
the shadow and caused UI test failures due to visual mismatch with
baseline snapshots.
 
### Description of Change
Updated logic to set `ClipBounds = null` once the view has a valid size,
restoring default Android behavior where layout bounds (not
`ClipBounds`) control rendering.

- Constructor still applies an empty clip to prevent pre-layout
full-screen flash
- Zero-size scenarios reapply the empty clip to maintain correctness
- Aligns with existing handling in `LayoutViewGroup`
[Ref](https://github.com/praveenkumarkarunanithi/maui/blob/main/src/Core/src/Platform/Android/LayoutViewGroup.cs#L161)
when clipping is disabled

 
### Issues Fixed
Fixes regression introduced by #33207 : 
`VerifyHybridWebViewWithShadow` on Candidate branch.
 
Tested the behaviour in the following platforms
- [x] Android
- [ ] Windows
- [ ] iOS
- [ ] Mac
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details:

- [SwipeViewShouldNotClose]UI test (Issue29086) fails with
[System.TimeoutException: Timed out waiting for no element] on Android
after PR #24275 was merged.

### Root Cause:

- PR #24275 added a check in
[MauiSwipeView.ShouldInterceptTouch()](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html)
to prevent taps on an open SwipeView from propagating to content
children:

- When [_isOpen] is true, [OnInterceptTouchEvent]returns true, which
causes Android to steal all touch events from children — including
buttons inside SwipeItemView controls. This breaks the Issue29086
scenario where buttons inside revealed swipe items (e.g., AddButton1)
need to receive taps to fire their [Command]and update the AutomationId.

### Description of Change

Touch event handling improvement:

* Updated `ShouldInterceptTouch(MotionEvent? e)` in `MauiSwipeView.cs`
to only intercept touches when the swipe view is open and the touch is
within the content area, enhancing gesture accuracy.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

- Regression introduced by PR #24275
- Resolved test case: SwipeViewShouldNotClose

| Before | After |
|----------|----------|
| <img
src="https://github.com/user-attachments/assets/4d3f99b6-00f7-4114-be7f-92a4821a9078">
| <img
src="https://github.com/user-attachments/assets/8bbdc3d2-bf70-4a6f-9652-fea8601d06ab">
|



<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
…h Candidate (#35028)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Issue details:
PR #24610 switched collection change wiring to a weak event proxy to fix
a memory leak, but the callback delegate was not strongly retained. As a
result, GC could collect the delegate, so CollectionChanged
notifications stopped reaching the Android items pipeline, which caused
the CarouselView and CollectionView test failures.


### Description of Change

<!-- Enter description of the fix in this section -->
In MarshalingObservableCollection.cs, added a strong field to hold the
NotifyCollectionChangedEventHandler delegate.
In the constructor, assigned that field once and passed the stored
delegate to WeakNotifyCollectionChangedProxy instead of passing a
temporary method-group delegate.
Kept existing dispose/unsubscribe behavior so the leak fix remains
intact while notifications continue to fire correctly.

### Failure test cases
**CarouselView tests fails**
* VerifyCarouselViewWithKeepItemInView 
* VerifyCarouselViewWithKeepItemInViewAndPreviousPosition 
* VerifyCarouselViewWithKeepItemInViewAndCurrentPosition 
* VerifyCarouselViewWithCurrentPosition 
* VerifyCarouselViewWithKeepLastItemInViewAndCurrentPosition
* AddItemsToCarouselViewWorks
 
**CollectionView test fails**
* VerifyModelItemsObservableCollectionWhenAddIndexAtItems
*
VerifyFlowDirectionRTLAndKeepLastItemInViewWithObservableListWhenVerticalGrid
*
VerifyFlowDirectionLTRAndKeepLastItemInViewWithObservableListWhenVerticalGrid
* VerifyKeepLastItemInViewWithObservableListWhenVerticalGrid
* VerifyKeepLastItemInViewWithObservableList
*
VerifyFlowDirectionLTRAndKeepLastItemInViewWithObservableListWhenHorizontalList
*
VerifyFlowDirectionRTLAndKeepLastItemInViewWithObservableListWhenHorizontalList
* VerifyFlowDirectionRTLAndKee

**Device Test fails**
* CollectionViewCanSizeToContent
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

PR #34228 added public `IAlertManager` and `IAlertManagerSubscription`
interfaces, but it was merged into `inflight/current` when the public
API change likely should have gone through `main` first.

This PR reverts the **public API surface** of those changes on
`inflight/candidate`, while keeping the refactor (the interfaces, the DI
wiring, the `AlertManager : IAlertManager` split) in place. The
interfaces are now marked `internal` so no new public API is shipped
from the inflight branches, and the `PublicAPI.Unshipped.txt` files are
restored to their pre-#34228 state.

### Changes

- Mark `IAlertManager` as `internal`
- Mark `IAlertManagerSubscription` as `internal`
- Remove the corresponding entries from all 7 `PublicAPI.Unshipped.txt`
files (net, net-android, net-ios, net-maccatalyst, net-tizen,
net-windows, netstandard)

All existing consumers (`AlertManager`, `Window`, `AlertManagerTests`)
are internal to the `Controls.Core` assembly and/or have
`InternalsVisibleTo`, so no other code changes are needed.

### Follow-up

The public API change can be re-introduced via a separate PR targeting
`main` if/when desired.

Targets: `inflight/candidate`
Related: #34228

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…4959)

This pull request updates test cases for carousel and label tap behavior
to improve reliability and accuracy. The main changes include improving
tap detection in label tests, updating the carousel view bounce test to
use a new button for navigation, and adding a new UI element to the
carousel view test page.

**Test improvements:**

* In the label tap test (`Issue21837.cs`), taps are now performed at
specific coordinates near the leading edge of each label's text to
ensure accurate hit detection, especially when label widths exceed the
rendered text width.

**Carousel view test updates:**

* The carousel bounce test (`Issue29261.cs`) now uses a newly added "Go
to Last" button to reliably set the carousel to the last position before
testing bounce behavior, replacing multiple swipe actions with a button
tap and scroll gestures.
* The test page for the carousel view (`Issue29261.cs`) adds a "Go to
Last" button (`goToLastButton`) to facilitate direct navigation to the
last carousel item.

**Test cleanup:**

* Removes unnecessary conditional compilation and comments related to
unsupported swipe actions on Catalyst, simplifying test code.

**Test image resaving:**
* Resaved the valid images on the Android, iOS and macOS platforms

**Fixes:** #34885

---------

Co-authored-by: NafeelaNazhir <nafeela.nazhirhussain@syncfusion.com>
Co-authored-by: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com>
Co-authored-by: HarishKumarSF4517 <harish.kumar@syncfusion.com>
Co-authored-by: Subhiksha Chandrasekaran <subhiksha.c@syncfusion.com>
Co-authored-by: LogishaSelvarajSF4525 <logisha.selvaraj@syncfusion.com>
…ranch (#35041)

<!-- Please let the below note in for people that find this PR -->
   > [!NOTE]
   > Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
  Thank you!
 
### Root Cause
During CarouselView startup, `UpdateFromPosition` triggers an initial
animated scroll to center the first item. In this flow, `_gotoPosition`
is set, but `CarouselViewScrolled` exits early (`!_initialized`), so
`UpdatePosition` never clears it. This leaves `_gotoPosition` stuck at
`0`, blocking subsequent programmatic scrolls.

When `Position = 1` is later set (Issue29216), the guard condition
(`_gotoPosition == -1`) fails, preventing the scroll.
 
### Description of Change
Updated the animated scroll path to assign `_gotoPosition` only after
initialization.
This aligns it with the non-animated fix -
[34996](#34996), preserves startup
centering behavior, and ensures `_gotoPosition` is set only when it can
be properly cleared.

### Issues Fixed
Fixes regression introduced by #34570 : 
`Issue29216CarouselViewScrollingIssue  on Candidate branch`.
 
Tested the behaviour in the following platforms
- [x] Android
- [ ] Windows
- [ ] iOS
- [ ] Mac
…n on candidate branch (#35057)

<!-- Please let the below note in for people that find this PR -->
   > [!NOTE]
   > Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
  Thank you!
 
### Root Cause
The previous regression fix (PR #35013) set `ClipBounds = null`
unconditionally in `OnSizeChanged` to resolve shadow clipping. While
effective for shadows, this reintroduced the original full-screen flash
issue (#31475) on slower devices.

The underlying issue is that `ClipBounds = null` removes GPU-level
rendering constraints. On slower devices, the hardware-accelerated
WebView compositor renders a frame at full-screen size before Android
layout bounds are enforced.

Debug analysis showed that when Shadow/Border/Clip is applied, MAUI
wraps the WebView inside a `WrapperView`. In this scenario, the wrapper
constrains rendering, making `ClipBounds = null` safe. Without
decorations, the WebView is hosted directly under `LayoutViewGroup`
(with `ClipChildren = false`), requiring explicit bounds to prevent the
flash.
 
### Description of Change
Introduced a `UpdateClipBounds` method to dynamically determine the
correct clipping strategy based on the parent:

* **Parent is WrapperView (decorations applied):** Sets `ClipBounds =
null` to allow shadow and visual overflow
* **Parent is not WrapperView (no decorations):** Sets exact bounds to
prevent full-screen flash on slower devices
* **Zero size:** Applies empty bounds to block rendering when the view
is collapsed

Additionally, added an `OnAttachedToWindow` override to re-evaluate
`ClipBounds` during runtime re-parenting (e.g., when shadow is toggled).
This is required because re-parenting does not trigger `OnSizeChanged`.

This approach aligns with existing MAUI patterns (e.g.,
`ContentViewGroup` handling parent checks in similar lifecycle hooks).

### Issues Fixed
Fixes regression introduced by #35013 : 
`WebViewBackgroundColorShouldBeApplied`  on Candidate branch.
 
Tested the behaviour in the following platforms
- [x] Android
- [ ] Windows
- [ ] iOS
- [ ] Mac
Ahamed-Ali and others added 2 commits April 22, 2026 13:48
…#35077)

This pull request makes a small change to the test case for Issue 29544.
The test now uses the CarouselView2 control instead of the original
CarouselView control in Issue29544.cs.

- LineHeightWithHTMLLabelShouldWork: Added the iOS 18 base image.
- GraphicsViewDrawableShouldSupportBinding,
GraphicsViewDrawableShouldSupportBindingRuntimeUpdate - Resaved the
valid images on the iOS 18 platform.

Fixes: #34885
@PureWeen PureWeen merged commit 4c231e9 into main Apr 29, 2026
192 of 195 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in MAUI SDK Ongoing Apr 29, 2026
@PureWeen PureWeen deleted the inflight/candidate branch April 29, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment