[Android] ScrollView: Fix HorizontalScrollBarVisibility not updating immediately at runtime#33528
Conversation
|
Hey there @@SubhikshaSf4851! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Pull request overview
This pull request fixes a bug where horizontal scrollbar visibility changes on Android didn't update immediately. The fix changes the layout refresh target from the parent MauiScrollView to the internal _hScrollView component that actually manages the horizontal scrollbar.
Changes:
- Fixed horizontal scrollbar visibility update on Android by targeting the correct view for layout refresh
- Added UI test to verify scrollbar visibility updates immediately without requiring user scrolling
- Added test snapshots for Android verifying the fix
Reviewed changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Core/src/Platform/Android/MauiScrollView.cs | Changed RequestLayoutIfNeeded(this) to RequestLayoutIfNeeded(_hScrollView) to fix scrollbar refresh |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33400.cs | Added NUnit test to verify immediate scrollbar visibility updates |
| src/Controls/tests/TestCases.HostApp/Issues/Issue33400.cs | Added test page with buttons to toggle horizontal scrollbar visibility |
| src/Controls/tests/TestCases.Android.Tests/snapshots/android/*.png | Added screenshot verification snapshots for Never, Always, and Default visibility states |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33400.cs
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
🤖 AI Summary📊 Expand Full Review🔍 Pre-Flight — Context & Validation📝 Review Session — Splitted the Method ·
|
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33528 | RequestLayoutIfNeeded(_hScrollView) instead of RequestLayoutIfNeeded(this) |
⏳ PENDING (Gate) | MauiScrollView.cs (+1,-1) |
1-line fix; correct target |
🚦 Gate — Test Verification
📝 Review Session — Splitted the Method · aa97729
Result: ❌ FAILED (Environment Blocked + Prior Analysis)
Platform: android
Mode: Full Verification Attempted
Verification Details
The Gate verification task agent could not complete (build/test timed out). However, a prior Gate run on commit df44fbd already established:
- Tests WITHOUT fix: ✅ PASS (expected FAIL) ❌ — Gate FAILS
- Tests WITH fix: ✅ PASS ✅
Root Cause of Gate Failure (Unchanged from Prior Review)
The tests are screenshot-based and verify scrollbar visibility by screenshot comparison. The bug is about timing — without the fix, the scrollbar updates only after a scroll event (delayed layout refresh). With the fix, it updates immediately. However, a screenshot taken ~500ms after the tap shows the same final state in both cases because:
- With fix: Scrollbar updates immediately at tap
- Without fix: Scrollbar updates slightly later (but still before the screenshot is taken)
The screenshot assertion cannot distinguish between "updated immediately" and "updated with a brief delay." Both produce identical screenshots.
Changes Since Prior Gate (Latest Commit aa9772998)
The author's only change was splitting the single test method into 3 separate test methods (Order 1/2/3 for Never/Always/Default). This is a structural improvement but does NOT change the fundamental test approach. Screenshot-based verification still cannot detect the timing bug.
Additional Issues Confirmed
-
Missing Windows snapshots:
Issue33400_Always.pngandIssue33400_Default.pngare missing for Windows; onlyIssue33400_Never.pngexists. The test runs on#if ANDROID || WINDOWSso Windows CI will fail. -
Default button triggers scroll:
scrollView.ScrollToAsync(100, 0, true)in the Default button handler triggers a scroll which is exactly the workaround that masks the bug. Even without the fix, the Default screenshot would look correct (scrollbar visible due to scroll trigger).
🔧 Fix — Analysis & Comparison
📝 Review Session — Splitted the Method · aa97729
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33528 | RequestLayoutIfNeeded(_hScrollView) instead of RequestLayoutIfNeeded(this) |
⏳ SKIPPED (Gate Failed) | MauiScrollView.cs (+1,-1) |
Code fix is correct; tests insufficient |
Exhausted: N/A — Fix phase skipped because Gate ❌ FAILED
Selected Fix: N/A — Gate did not pass; test improvements required before fix can be validated
Analysis
The PR's 1-line fix is technically correct:
_hScrollView.HorizontalScrollBarEnabledand_hScrollView.ScrollbarFadingEnabledare set on_hScrollView- Therefore
PlatformInterop.RequestLayoutIfNeededmust target_hScrollViewto trigger a layout refresh on the view that actually owns the horizontal scrollbar SetVerticalScrollBarVisibilitycorrectly callsPlatformInterop.RequestLayoutIfNeeded(this)because the vertical scrollbar lives on the outerMauiScrollView
The fix is independently logical and matches the existing code pattern. However, the tests cannot validate that the fix actually works (Gate failed), so the PR cannot be merged as-is.
📋 Report — Final Recommendation
📝 Review Session — Splitted the Method · aa97729
⚠️ Final Recommendation: REQUEST CHANGES
Summary
PR #33528 fixes HorizontalScrollBarVisibility not updating immediately at runtime on Android. The 1-line code fix is technically correct and well-targeted. However, the tests do not catch the bug (Gate ❌ FAILED in prior review, environment blocked in this review), and additional test quality issues must be addressed before the PR can be merged.
This is a re-review of the PR at HEAD aa9772998 ("Splitted the Method", Feb 23, 2026). The author's latest change split the single test method into 3 separate ones (Never/Always/Default) but did not address the core test issues.
Root Cause
PlatformInterop.RequestLayoutIfNeeded was called on MauiScrollView (the outer container) instead of _hScrollView (the inner MauiHorizontalScrollView that owns the horizontal scrollbar). Requesting layout on the wrong view did not trigger a refresh of the horizontal scrollbar's visibility state, so the scrollbar only updated when a scroll event happened to trigger layout on the correct view.
Fix Quality
The fix itself is minimal, correct, and properly targeted:
- Before:
PlatformInterop.RequestLayoutIfNeeded(this); - After:
PlatformInterop.RequestLayoutIfNeeded(_hScrollView);
This is consistent with the existing code pattern: SetVerticalScrollBarVisibility correctly uses PlatformInterop.RequestLayoutIfNeeded(this) because the vertical scrollbar lives on the outer MauiScrollView, while the horizontal scrollbar lives on the inner _hScrollView.
Issues Requiring Changes
1. 🔴 Tests Don't Catch the Bug (Gate ❌ FAILED)
Problem: The screenshot-based test passes both with and without the fix. The bug is about timing — without the fix, the scrollbar updates only after a scroll event, but by the time the screenshot is taken (~500ms after the tap), the UI has already rendered via normal refresh cycles. Both states produce identical screenshots.
The latest commit (splitting methods) does not address this — three separate screenshot methods have the same fundamental problem.
Required: The test needs a way to verify the scrollbar state immediately after visibility change, before any scroll events occur. Possible approaches:
- Use Appium element attribute inspection to check if the scrollbar element is visible/enabled directly after the tap, without relying on screenshot timing
- Or add a specific assertion that verifies the layout was immediately refreshed (e.g., checking
HorizontalScrollBarEnabledstate via platform reflection) - Note: This is a hard problem — the author should clarify whether an alternative testing approach is feasible, or acknowledge this as a limitation and request a skip/waiver from the team
2. 🔴 Missing Windows Snapshot Baselines
Problem: The test uses #if ANDROID || WINDOWS, meaning it runs on Windows CI. But only Issue33400_Never.png exists for Windows — Issue33400_Always.png and Issue33400_Default.png are missing. Windows CI will fail on these tests.
Required: Either:
- Add the missing Windows baseline snapshots (
Issue33400_Always.pngandIssue33400_Default.pnginTestCases.WinUI.Tests/snapshots/windows/), OR - Change to
#if ANDROIDonly if Windows testing is not necessary for this Android fix
3. 🟡 Default Button Triggers a Scroll (Masks Bug)
Problem: The Default button handler calls scrollView.ScrollToAsync(100, 0, true) after setting visibility. This triggers a scroll event, which is exactly the workaround that causes the scrollbar to update even without the fix. This:
- Makes the Default screenshot test unreliable as a regression test
- Obscures the bug (even without the fix, Default appears to work via the scroll trigger)
Recommendation: Remove scrollView.ScrollToAsync(100, 0, true) from the Default button handler.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33528 | RequestLayoutIfNeeded(_hScrollView) |
❌ Gate Failed (tests don't catch bug) | MauiScrollView.cs (+1,-1) |
Code fix is correct; test issues must be resolved |
📋 Expand PR Finalization Review
Title: ✅ Good
Current: [Android] ScrollView: Fix HorizontalScrollBarVisibility not updating immediately at runtime
Description: ✅ Good
Description needs updates. See details below.
✨ Suggested PR Description
[!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 from this PR and let us know in a comment if this change resolves your issue. Thank you!
Root Cause
In MauiScrollView.SetHorizontalScrollBarVisibility, PlatformInterop.RequestLayoutIfNeeded was called on this (the outer MauiScrollView), but the horizontal scrollbar lives on the inner _hScrollView (MauiHorizontalScrollView). Requesting layout on the outer view did not trigger a layout refresh for the inner horizontal scroll view, so the scrollbar visibility change (e.g., Always → Never) was not reflected visually until the user triggered a scroll.
Description of Change
Changed PlatformInterop.RequestLayoutIfNeeded(this) to PlatformInterop.RequestLayoutIfNeeded(_hScrollView) in MauiScrollView.SetHorizontalScrollBarVisibility.
This mirrors the pattern already used by SetVerticalScrollBarVisibility, where this is the correct target because the vertical scrollbar lives on the outer MauiScrollView. For horizontal scroll, the inner MauiHorizontalScrollView (_hScrollView) must be refreshed.
File changed:
src/Core/src/Platform/Android/MauiScrollView.cs— One-line fix inSetHorizontalScrollBarVisibility
Tests added:
src/Controls/tests/TestCases.HostApp/Issues/Issue33400.cs— HostApp page with a horizontalScrollViewand buttons to toggleHorizontalScrollBarVisibilitybetween Always, Never, and Defaultsrc/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33400.cs— UI tests (Android and Windows) verifying each visibility state via screenshot comparison
Known Related Issue (Out of Scope)
macOS has a similar scrollbar refresh problem (both horizontal and vertical). That is a separate, pre-existing issue tracked in #7767 and is not addressed by this PR.
Issues Fixed
Fixes #33400
Platforms Tested
- Android ✅ (fix applies here; UI tests + snapshot baselines added)
- Windows ✅ (UI test guard includes Windows; snapshot baseline added for Never)
- iOS — not applicable (fix is in Android platform code; iOS uses a different scrollbar implementation)
- Mac — not fixed (see Known Related Issue above)
Code Review: ✅ Passed
Code Review — PR #33528
PR: #33528 — [Android] ScrollView: Fix HorizontalScrollBarVisibility not updating immediately at runtime
🟡 Suggestions
1. Missing Windows Snapshot Baselines for Two Test Methods
File: src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/
Problem: The UI test class is compiled for #if ANDROID || WINDOWS, meaning all three test methods run on Windows:
Issue33400ScrollbarVisibilityNever→ callsVerifyScreenshot("Issue33400_Never")Issue33400ScrollbarVisibilityAlways→ callsVerifyScreenshot("Issue33400_Always")Issue33400ScrollbarVisibilityDefault→ callsVerifyScreenshot("Issue33400_Default")
However, only one Windows snapshot baseline is committed:
- ✅
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/Issue33400_Never.png - ❌
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/Issue33400_Always.png(missing) - ❌
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/Issue33400_Default.png(missing)
This will cause the Issue33400ScrollbarVisibilityAlways and Issue33400ScrollbarVisibilityDefault Windows tests to fail on CI when baseline images don't exist.
Recommendation: Add the missing Windows snapshot baselines, or if horizontal scrollbar visibility is not meaningfully testable on Windows in this way, adjust the test guard (e.g., #if ANDROID) and remove the Windows snapshot.
2. Workaround Comment in HostApp Default Button Handler
File: src/Controls/tests/TestCases.HostApp/Issues/Issue33400.cs
Code:
defaultButton.Clicked += (s, e) =>
{
scrollView.HorizontalScrollBarVisibility = ScrollBarVisibility.Default;
scrollView.ScrollToAsync(100, 0, true); //Slight scroll to show the scrollbar
};Problem: The comment "Slight scroll to show the scrollbar" reads like the old workaround (the bug behavior — visibility only updates after a scroll). For ScrollBarVisibility.Default, Android may genuinely require a scroll to display the scrollbar (as it is shown on demand), so the ScrollToAsync call might be intentional. However, this is confusing given that the PR's purpose is to fix exactly this behavior.
Recommendation: Clarify the comment to distinguish between "workaround for the bug" vs "needed to reveal a Default-mode scrollbar that only appears during scroll activity". For example:
// ScrollBarVisibility.Default shows the scrollbar only while scrolling — trigger a scroll to make it visible for testing
scrollView.ScrollToAsync(100, 0, true);✅ Looks Good
-
Core fix is minimal and correct. The one-line change (
PlatformInterop.RequestLayoutIfNeeded(_hScrollView)instead ofthis) is precisely targeted. It mirrors the symmetry already present inSetVerticalScrollBarVisibility(which correctly calls it onthisbecause the vertical scrollbar lives on the outer view). -
Fix doesn't break vertical scrollbar. The
SetVerticalScrollBarVisibilitymethod continues to callRequestLayoutIfNeeded(this)unchanged — correct because the outerMauiScrollViewowns the vertical scrollbar. -
Correct null guard preserved. The existing early-return for
_hScrollView == nullat line 114 still protects the new call, preventing a NullReferenceException if_hScrollViewhasn't been initialized. -
Tests cover all three visibility states.
Never,Always, andDefaultare all exercised via screenshot tests on Android with all three baselines committed. -
Test guard matches fix scope. Using
#if ANDROID || WINDOWS(as updated from the priorTEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOSguard) is readable and intentional. -
HostApp page is well-structured. Clear layout with a horizontal
ScrollView, three toggle buttons with descriptiveAutomationIds, and realistic long text content to ensure the scrollbar appears.
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33400.cs
Outdated
Show resolved
Hide resolved
I’ve updated the changes based on the review. Specifically:
|
…immediately at runtime (#33528) <!-- 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 scrollbar visibility update was applied to MauiScrollView, which did not immediately trigger a layout refresh for the horizontal scrollbar. As a result, the scrollbar updated only after a slight scroll ### Description of Change Updated the call to `PlatformInterop.RequestLayoutIfNeeded` in `MauiScrollView.cs` to target the internal `_hScrollView` instead of the parent, ensuring the horizontal scrollbar visibility updates as expected. <!-- Enter description of the fix in this section --> ### 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. --> Fixes #33400 **Mac Platform** Related known scrollbar refresh behavior — refer #7767 (comment) ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/c542e4b6-8347-4c44-bac8-956c24046d7b"> | <video src="https://github.com/user-attachments/assets/6e2b24aa-2b52-446f-98f2-f859601f93a3"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
…immediately at runtime (#33528) <!-- 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 scrollbar visibility update was applied to MauiScrollView, which did not immediately trigger a layout refresh for the horizontal scrollbar. As a result, the scrollbar updated only after a slight scroll ### Description of Change Updated the call to `PlatformInterop.RequestLayoutIfNeeded` in `MauiScrollView.cs` to target the internal `_hScrollView` instead of the parent, ensuring the horizontal scrollbar visibility updates as expected. <!-- Enter description of the fix in this section --> ### 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. --> Fixes #33400 **Mac Platform** Related known scrollbar refresh behavior — refer #7767 (comment) ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/c542e4b6-8347-4c44-bac8-956c24046d7b"> | <video src="https://github.com/user-attachments/assets/6e2b24aa-2b52-446f-98f2-f859601f93a3"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
…immediately at runtime (#33528) <!-- 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 scrollbar visibility update was applied to MauiScrollView, which did not immediately trigger a layout refresh for the horizontal scrollbar. As a result, the scrollbar updated only after a slight scroll ### Description of Change Updated the call to `PlatformInterop.RequestLayoutIfNeeded` in `MauiScrollView.cs` to target the internal `_hScrollView` instead of the parent, ensuring the horizontal scrollbar visibility updates as expected. <!-- Enter description of the fix in this section --> ### 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. --> Fixes #33400 **Mac Platform** Related known scrollbar refresh behavior — refer #7767 (comment) ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/c542e4b6-8347-4c44-bac8-956c24046d7b"> | <video src="https://github.com/user-attachments/assets/6e2b24aa-2b52-446f-98f2-f859601f93a3"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
…immediately at runtime (#33528) <!-- 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 scrollbar visibility update was applied to MauiScrollView, which did not immediately trigger a layout refresh for the horizontal scrollbar. As a result, the scrollbar updated only after a slight scroll ### Description of Change Updated the call to `PlatformInterop.RequestLayoutIfNeeded` in `MauiScrollView.cs` to target the internal `_hScrollView` instead of the parent, ensuring the horizontal scrollbar visibility updates as expected. <!-- Enter description of the fix in this section --> ### 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. --> Fixes #33400 **Mac Platform** Related known scrollbar refresh behavior — refer #7767 (comment) ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/c542e4b6-8347-4c44-bac8-956c24046d7b"> | <video src="https://github.com/user-attachments/assets/6e2b24aa-2b52-446f-98f2-f859601f93a3"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
…immediately at runtime (#33528) <!-- 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 scrollbar visibility update was applied to MauiScrollView, which did not immediately trigger a layout refresh for the horizontal scrollbar. As a result, the scrollbar updated only after a slight scroll ### Description of Change Updated the call to `PlatformInterop.RequestLayoutIfNeeded` in `MauiScrollView.cs` to target the internal `_hScrollView` instead of the parent, ensuring the horizontal scrollbar visibility updates as expected. <!-- Enter description of the fix in this section --> ### 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. --> Fixes #33400 **Mac Platform** Related known scrollbar refresh behavior — refer #7767 (comment) ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/c542e4b6-8347-4c44-bac8-956c24046d7b"> | <video src="https://github.com/user-attachments/assets/6e2b24aa-2b52-446f-98f2-f859601f93a3"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
## What's Coming .NET MAUI inflight/candidate introduces significant improvements across all platforms with focus on quality, performance, and developer experience. This release includes 66 commits with various improvements, bug fixes, and enhancements. ## Activityindicator - [Android] Implemented material3 support for ActivityIndicator by @Dhivya-SF4094 in #33481 <details> <summary>🔧 Fixes</summary> - [Implement material3 support for ActivityIndicator](#33479) </details> - [iOS] Fix: ActivityIndicator IsRunning ignores IsVisible when set to true by @bhavanesh2001 in #28983 <details> <summary>🔧 Fixes</summary> - [[iOS] [ActivityIndicator] `IsRunning` ignores `IsVisible` when set to `true`](#28968) </details> ## Button - [iOS] Button RTL text and image overlap - fix by @kubaflo in #29041 ## Checkbox - [iOS/MacCatalyst] Fix CheckBox foreground color not resetting when set to null by @Ahamed-Ali in #34284 <details> <summary>🔧 Fixes</summary> - [[iOS] Color of the checkBox control is not properly worked on dynamic scenarios](#34278) </details> ## CollectionView - [iOS] Fix: CollectionView does not clear selection when SelectedItem is set to null by @Tamilarasan-Paranthaman in #30420 <details> <summary>🔧 Fixes</summary> - [CollectionView not being able to remove selected item highlight on iOS](#30363) - [[MAUI] Select items traces are preserved](#26187) </details> - [iOS] CV2 ItemsLayout update by @kubaflo in #28675 <details> <summary>🔧 Fixes</summary> - [CollectionView CollectionViewHandler2 doesnt change ItemsLayout on DataTrigger](#28656) - [iOS CollectionView doesn't respect a change to ItemsLayout when using Items2.CollectionViewHandler2](#31259) </details> - [iOS][CV2] Fix CollectionView renders large empty space at bottom of view by @devanathan-vaithiyanathan in #31215 <details> <summary>🔧 Fixes</summary> - [[iOS] [MacCatalyst] CollectionView renders large empty space at bottom of view](#17799) - [[iOS/Mac] CollectionView2 EmptyView takes up large horizontal space even when the content is small](#33201) </details> - [iOS] Fixed issue where group Header/Footer template was set to all items when IsGrouped was true for an ObservableCollection by @Tamilarasan-Paranthaman in #29144 <details> <summary>🔧 Fixes</summary> - [[iOS] Group Header/Footer Repeated for All Items When IsGrouped is True for ObservableCollection in CollectionView](#29141) </details> - [Android] Fix CollectionView selection crash with HeaderTemplate by @NirmalKumarYuvaraj in #34275 <details> <summary>🔧 Fixes</summary> - [[Bug] [Android] System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index](#34247) </details> ## DateTimePicker - [iOS] Fix TimePicker AM/PM frequently changes when the app is closed and reopened by @devanathan-vaithiyanathan in #31066 <details> <summary>🔧 Fixes</summary> - [[iOS] TimePicker AM/PM frequently changes when the app is closed and reopened](#30837) - [Maui 10 iOS TimePicker Strange Characters in place of AM/PM](#33722) </details> - Android TimePicker ignores 24 hour system setting when using Format Property - fix by @kubaflo in #28797 <details> <summary>🔧 Fixes</summary> - [Android TimePicker ignores 24 hour system setting when using Format Property](#28784) </details> ## Drawing - [iOS, Mac, Windows] GraphicsView: Fix Background/BackgroundColor not updating by @NirmalKumarYuvaraj in #31254 <details> <summary>🔧 Fixes</summary> - [[iOS, Mac, Windows] GraphicsView does not change the Background/BackgroundColor](#31239) </details> - [iOS] GraphicsView DrawString - fix by @kubaflo in #26304 <details> <summary>🔧 Fixes</summary> - [DrawString not rendering in iOS.](#24450) - [GraphicsView DrawString not rendering in iOS](#8486) - [DrawString doesn't work on maccatalyst](#4993) </details> - [Android] - Fix Shadow Rendering For Transparent Fill, Stroke (Lines), and Text on Shapes by @prakashKannanSf3972 in #29528 <details> <summary>🔧 Fixes</summary> - [Ellipse Transparency Not Rendered When Drawing Arc Inside the Ellipse Using GraphicsView on Android](#29394) </details> - Revert "[iOS, Mac, Windows] GraphicsView: Fix Background/BackgroundColor not updating (#31254)" by @Ahamed-Ali via @Copilot in #34508 ## Entry - [iOS 26] Fix Entry MaxLength not enforced due to new multi-range delegate by @kubaflo in #32045 <details> <summary>🔧 Fixes</summary> - [iOS 26 - The MaxLength property value is not respected on an Entry control.](#32016) - [.NET MAUI Entry Maximum Length not working on iOS and macOS](#33316) </details> - [iOS] Fixed Entry with IsPassword toggling loses previously entered text by @SubhikshaSf4851 in #30572 <details> <summary>🔧 Fixes</summary> - [Entry with IsPassword toggling loses previously entered text on iOS when IsPassword is re-enabled](#30085) </details> ## Essentials - Fix for FilePicker PickMultipleAsync nullable reference type by @SuthiYuvaraj in #33163 <details> <summary>🔧 Fixes</summary> - [FilePicker PickMultipleAsync nullable reference type](#33114) </details> - Replace deprecated NetworkReachability with NWPathMonitor on iOS/macOS by @jfversluis via @Copilot in #32354 <details> <summary>🔧 Fixes</summary> - [NetworkReachability is obsolete on iOS/maccatalyst 17.4+](#32312) - [Use NWPathMonitor on iOS for Essentials Connectivity](#2574) </details> ## Essentials Connectivity - Update Android Connectivity implementation to use modern APIs by @jfversluis via @Copilot in #30348 <details> <summary>🔧 Fixes</summary> - [Update the Android Connectivity implementation to user modern APIs](#30347) </details> ## Flyout - [iOS] Fixed Flyout icon not updating when root page changes using InsertPageBefore by @Vignesh-SF3580 in #29924 <details> <summary>🔧 Fixes</summary> - [[iOS] Flyout icon not replaced by back button when root page is changed using InsertPageBefore](#29921) </details> ## Flyoutpage - [iOS] Flyout Items Not Displayed in RightToLeft FlowDirection in Landscape - fix by @kubaflo in #26762 <details> <summary>🔧 Fixes</summary> - [Flyout Items Not Displayed in RightToLeft FlowDirection on iOS in Landscape Orientation and Hamburger Icon Positioned Incorrectly](#26726) </details> ## Image - [Android] Implemented Material3 support for Image by @Dhivya-SF4094 in #33661 <details> <summary>🔧 Fixes</summary> - [Implement Material3 support for Image](#33660) </details> ## Keyboard - [iOS] Fix gap at top of view after rotating device while Entry keyboard is visible by @praveenkumarkarunanithi in #34328 <details> <summary>🔧 Fixes</summary> - [Focusing and entering texts on entry control causes a gap at the top after rotating simulator.](#33407) </details> ## Label - [Android] Support for images inside HTML label by @kubaflo in #21679 <details> <summary>🔧 Fixes</summary> - [Label with HTML TextType does not display images on Android](#21044) </details> - [fix] ContentLabel Moved to a nested class to prevent CS0122 in external source generators by @SubhikshaSf4851 in #34514 <details> <summary>🔧 Fixes</summary> - [[MAUI] Building Maui App with sample content results CS0122 errors.](#34512) </details> ## Layout - Optimize ordering of children in Flex layout by @symbiogenesis in #21961 - [Android] Fix control size properties not available during Loaded event by @Vignesh-SF3580 in #31590 <details> <summary>🔧 Fixes</summary> - [CollectionView on Android does not provide height, width, logical children once loaded, works fine on Windows](#14364) - [Control's Loaded event invokes before calling its measure override method.](#14160) </details> ## Mediapicker - [iOS/Android] MediaPicker: Fix image orientation when RotateImage=true by @michalpobuta in #33892 <details> <summary>🔧 Fixes</summary> - [MediaPicker.PickPhotosAsync does not preserve image orientation](#32650) </details> ## Modal - [Windows] Fix modal page keyboard focus not shifting to newly opened modal by @jfversluis in #34212 <details> <summary>🔧 Fixes</summary> - [Keyboard focus does not shift to a newly opened modal page: Pressing enter clicks the button on the page beneath the modal page](#22938) </details> ## Navigation - [iOS26] Apply view margins in title view by @kubaflo in #32205 <details> <summary>🔧 Fixes</summary> - [NavigationPage TitleView iOS 26](#32200) </details> - [iOS] System.NullReferenceException at NavigationRenderer.SetStatusBarStyle() by @kubaflo in #29564 <details> <summary>🔧 Fixes</summary> - [System.NullReferenceException at NavigationRenderer.SetStatusBarStyle()](#29535) </details> - [iOS 26] Fix back button color not applied for NavigationPage by @Shalini-Ashokan in #34326 <details> <summary>🔧 Fixes</summary> - [[iOS] Color not applied to the Back button text or image on iOS 26](#33966) </details> ## Picker - Fix Picker layout on Mac Catalyst 26+ by @kubaflo in #33146 <details> <summary>🔧 Fixes</summary> - [[MacOS 26] Text on picker options are not centered on macOS 26.1](#33229) </details> ## Progressbar - [Android] Implemented Material3 support for ProgressBar by @SyedAbdulAzeemSF4852 in #33926 <details> <summary>🔧 Fixes</summary> - [Implement Material3 support for Progressbar](#33925) </details> ## RadioButton - [iOS, Mac] Fix for RadioButton TextColor for plain Content not working by @HarishwaranVijayakumar in #31940 <details> <summary>🔧 Fixes</summary> - [RadioButton: TextColor for plain Content not working on iOS](#18011) </details> - [All Platforms] Fix RadioButton warning when ControlTemplate is set with View content by @kubaflo in #33839 <details> <summary>🔧 Fixes</summary> - [Seeking clarification on RadioButton + ControlTemplate + Content documentation](#33829) </details> - Visual state change for disabled RadioButton by @kubaflo in #23471 <details> <summary>🔧 Fixes</summary> - [RadioButton disabled UI issue - iOS](#18668) </details> ## SafeArea - [Android] Fix for TabbedPage BottomNavigation BarBackgroundColor not extending to system navigation bar by @praveenkumarkarunanithi in #33428 <details> <summary>🔧 Fixes</summary> - [[Android] TabbedPage BottomNavigation BarBackgroundColor does not extend to system navigation bar area in Edge-to-Edge mode](#33344) </details> ## ScrollView - [Android] ScrollView: Fix HorizontalScrollBarVisibility not updating immediately at runtime by @SubhikshaSf4851 in #33528 <details> <summary>🔧 Fixes</summary> - [Runtime Scrollbar visibility not updating correctly on Android and macOS platforms.](#33400) </details> - Fixed crash when calling ItemsView.ScrollTo on unloaded CollectionView by @kubaflo in #25444 <details> <summary>🔧 Fixes</summary> - [App crashes when calling ItemsView.ScrollTo on unloaded CollectionView](#23014) </details> ## Shell - [Shell] Update logic for iOS large title display in ShellItemRenderer by @kubaflo in #33246 - [iOS][Shell] Fix navigation lifecycle and back button for More tab (>5 tabs) by @kubaflo in #27932 <details> <summary>🔧 Fixes</summary> - [OnAppearing and OnNavigatedTo does not work when using extended Tabbar (tabbar with more than 5 tabs) on IOS.](#27799) - [Shell.BackButtonBehavior does not work when using extended Tabbar (tabbar with more than 5 tabs)on IOS.](#27800) - [Shell TabBar More button causes ViewModel command binding disconnection on back navigation](#30862) - [Content page onappearing not firing if tabs are on the more tab on IOS](#31166) </details> - [iOS 26] Fix tab bar ghosting when navigating from modal to tabbed Shell content by @SubhikshaSf4851 in #34254 <details> <summary>🔧 Fixes</summary> - [[iOS] Tab bar ghosting issue on iOS 26 (liquid glass)](#34143) </details> - Fix for Shell tab visibility not updating when navigating back multiple pages by @BagavathiPerumal in #34403 <details> <summary>🔧 Fixes</summary> - [Changing Shell Tab Visibility when navigating back multiple pages ignores Shell Tab Visibility](#33351) </details> - [iOS/Mac] Fixed OnBackButtonPressed not firing for Shell Navigation Bar Button by @Dhivya-SF4094 in #34401 <details> <summary>🔧 Fixes</summary> - [[iOS] OnBackButtonPressed not firing for Shell Navigation Bar button](#34190) </details> ## Slider - [iOS] Fix for Slider ThumbImageSource is not centered properly on iOS 26 by @HarishwaranVijayakumar in #34019 <details> <summary>🔧 Fixes</summary> - [[iOS 26] Slider ThumbImageSource is not centered properly](#33967) </details> - [Android] Fix improper rendering of ThumbimageSource in Slider by @NirmalKumarYuvaraj in #34064 <details> <summary>🔧 Fixes</summary> - [[Slider] MAUI Slider thumb image is big on android](#13258) </details> ## Stepper - [iOS] Fix Stepper layout overlap in landscape on iOS 26 by @Vignesh-SF3580 in #34325 <details> <summary>🔧 Fixes</summary> - [[.NET10] D10 - Customize cursor position - Rotating simulator makes the button and label overlap](#34273) </details> ## SwipeView - [iOS] SwipeView: Honor FontImageSource.Color in SwipeItem icon by @kubaflo in #27389 <details> <summary>🔧 Fixes</summary> - [[iOS] SwipeView: SwipeItem.IconImageSource.FontImageSource color value not honored](#27377) </details> ## Switch - [Android] Fix Switch thumb shadow missing when ThumbColor is set by @Shalini-Ashokan in #33960 <details> <summary>🔧 Fixes</summary> - [Android Switch Control Thumb Shadow](#19676) </details> ## Toolbar - [iOS/Mac Catalyst 26] Fix Shell.ForegroundColor not applied to ToolbarItems by @SyedAbdulAzeemSF4852 in #34085 <details> <summary>🔧 Fixes</summary> - [[iOS26] Shell.ForegroundColor is not applied to ToolbarItems](#34083) </details> - [Android] VoiceOver on Toolbar Item by @kubaflo in #29596 <details> <summary>🔧 Fixes</summary> - [VoiceOver on Toolbar Item](#29573) - [SemanticProperties do not work on ToolbarItems](#23623) </details> <details> <summary>🧪 Testing (11)</summary> - [Testing] Additional Feature Matrix Test Cases for CollectionView by @TamilarasanSF4853 in #32432 - [Testing] Feature Matrix UITest Cases for VisualStateManager by @LogishaSelvarajSF4525 in #34146 - [Testing] Feature Matrix UITest Cases for Clip by @TamilarasanSF4853 in #34121 - [Testing] Feature matrix UITest Cases for Map Control by @HarishKumarSF4517 in #31656 - [Testing] Feature matrix UITest Cases for Visual Transform Control by @HarishKumarSF4517 in #32799 - [Testing] Feature Matrix UITest Cases for Shell Pages by @NafeelaNazhir in #33945 - [Testing] Feature Matrix UITest Cases for Triggers by @HarishKumarSF4517 in #34152 - [Testing] Refactoring Feature Matrix UITest Cases for CheckBox Control by @LogishaSelvarajSF4525 in #34283 - Resolve UI test Build Sample failures - Candidate March 16 by @Ahamed-Ali in #34442 - Fix the failures in the Candidate branch- March 16 by @Ahamed-Ali in #34453 <details> <summary>🔧 Fixes</summary> - [March 16th, Candidate](#34437) </details> - Fixed the iOS 18.5 Candidate failures (March 16,2026) by @Ahamed-Ali in #34593 <details> <summary>🔧 Fixes</summary> - [March 16th, Candidate](#34437) </details> </details> <details> <summary>📦 Other (2)</summary> - Fixed candidate test failures caused by PR #33428. by @Ahamed-Ali in #34515 <details> <summary>🔧 Fixes</summary> - [[.NET10] On Android, there's a big space at the top for I, M and N2 & N3](#34509) </details> - Revert "[iOS] Button RTL text and image overlap - fix (#29041)" in b0497af </details> <details> <summary>📝 Issue References</summary> Fixes #2574, Fixes #4993, Fixes #8486, Fixes #13258, Fixes #14160, Fixes #14364, Fixes #17799, Fixes #18011, Fixes #18668, Fixes #19676, Fixes #21044, Fixes #22938, Fixes #23014, Fixes #23623, Fixes #24450, Fixes #26187, Fixes #26726, Fixes #27377, Fixes #27799, Fixes #27800, Fixes #28656, Fixes #28784, Fixes #28968, Fixes #29141, Fixes #29394, Fixes #29535, Fixes #29573, Fixes #29921, Fixes #30085, Fixes #30347, Fixes #30363, Fixes #30837, Fixes #30862, Fixes #31166, Fixes #31239, Fixes #31259, Fixes #32016, Fixes #32200, Fixes #32312, Fixes #32650, Fixes #33114, Fixes #33201, Fixes #33229, Fixes #33316, Fixes #33344, Fixes #33351, Fixes #33400, Fixes #33407, Fixes #33479, Fixes #33660, Fixes #33722, Fixes #33829, Fixes #33925, Fixes #33966, Fixes #33967, Fixes #34083, Fixes #34143, Fixes #34190, Fixes #34247, Fixes #34273, Fixes #34278, Fixes #34437, Fixes #34509, Fixes #34512 </details> **Full Changelog**: main...inflight/candidate
…immediately at runtime (dotnet#33528) <!-- 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 scrollbar visibility update was applied to MauiScrollView, which did not immediately trigger a layout refresh for the horizontal scrollbar. As a result, the scrollbar updated only after a slight scroll ### Description of Change Updated the call to `PlatformInterop.RequestLayoutIfNeeded` in `MauiScrollView.cs` to target the internal `_hScrollView` instead of the parent, ensuring the horizontal scrollbar visibility updates as expected. <!-- Enter description of the fix in this section --> ### 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. --> Fixes dotnet#33400 **Mac Platform** Related known scrollbar refresh behavior — refer dotnet#7767 (comment) ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/c542e4b6-8347-4c44-bac8-956c24046d7b"> | <video src="https://github.com/user-attachments/assets/6e2b24aa-2b52-446f-98f2-f859601f93a3"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
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 from this PR and let us know in a comment if this change resolves your issue. Thank you!
Root cause
The scrollbar visibility update was applied to MauiScrollView, which did not immediately trigger a layout refresh for the horizontal scrollbar. As a result, the scrollbar updated only after a slight scroll
Description of Change
Updated the call to
PlatformInterop.RequestLayoutIfNeededinMauiScrollView.csto target the internal_hScrollViewinstead of the parent, ensuring the horizontal scrollbar visibility updates as expected.Issues Fixed
Fixes #33400
Mac Platform
Related known scrollbar refresh behavior — refer #7767 (comment)
Tested the behavior in the following platforms
BeforeFix33400.mov
AftreFix33400.mov