Skip to content

Commit aeb2b6a

Browse files
Copilothaavamoa
andcommitted
Override Background mapper to preserve UIToolbar native system appearance
Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
1 parent 1fc5b71 commit aeb2b6a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/library/DIPS.Mobile.UI/Components/Toolbar/ToolbarHandler.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ public ToolbarHandler() : base(PropertyMapper)
1010
new PropertyMapper<Toolbar, ToolbarHandler>(ViewMapper)
1111
{
1212
[nameof(Toolbar.Buttons)] = MapButtons,
13+
// Prevent MAUI from overriding the native platform view's own background rendering.
14+
// On iOS, UIToolbar manages its own system appearance (blur/Liquid Glass);
15+
// on Android, we set the background explicitly in CreatePlatformView.
16+
["Background"] = static (_, _) => { },
1317
};
1418

1519
private static partial void MapButtons(ToolbarHandler handler, Toolbar toolbar);

0 commit comments

Comments
 (0)