@@ -7,17 +7,26 @@ namespace DIPS.Mobile.UI.Components.Toolbar;
77
88public partial class ToolbarHandler : ViewHandler < Toolbar , UIToolbar >
99{
10- protected override UIToolbar CreatePlatformView ( )
11- {
12- // Use the default UIToolbar system appearance — do NOT set BarTintColor or Translucent = false,
13- // as that overrides the system-provided translucent material (Liquid Glass on iOS 26+,
14- // blurred translucent bar on earlier versions).
15- return new UIToolbar ( ) ;
16- }
10+ protected override UIToolbar CreatePlatformView ( ) => new UIToolbar ( ) ;
1711
1812 protected override void ConnectHandler ( UIToolbar platformView )
1913 {
2014 base . ConnectHandler ( platformView ) ;
15+
16+ // Explicitly apply the default system appearance so iOS renders the correct
17+ // material: Liquid Glass on iOS 26+, translucent blurred bar on earlier versions.
18+ // ConfigureWithDefaultBackground() is required for standalone toolbars (i.e. not
19+ // managed by UINavigationController) to opt into the platform glass material.
20+ var appearance = new UIToolbarAppearance ( ) ;
21+ appearance . ConfigureWithDefaultBackground ( ) ;
22+ platformView . StandardAppearance = appearance ;
23+ platformView . CompactAppearance = appearance ;
24+ platformView . ScrollEdgeAppearance = appearance ;
25+
26+ // Ensure no residual background from MAUI's setup path is blocking the glass layer.
27+ platformView . BackgroundColor = null ;
28+ platformView . Layer . BackgroundColor = null ;
29+
2130 UpdateButtons ( ) ;
2231 }
2332
0 commit comments