|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Liquid Glass Support for .NET MAUI Backdrop Page | Syncfusion® |
| 4 | +description: Learn how to enable liquid glass support for the Syncfusion® .NET MAUI Backdrop Page using the EnableLiquidGlassEffect property. |
| 5 | +platform: MAUI |
| 6 | +control: SfBackdropPage |
| 7 | +documentation: ug |
| 8 | +--- |
| 9 | + |
| 10 | +# Liquid Glass Support |
| 11 | + |
| 12 | +The [SfBackdropPage](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Backdrop.SfBackdropPage.html) supports a liquid glass appearance on both layers. Enable the effect directly on the [BackdropBackLayer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Backdrop.BackdropBackLayer.html) and [BackdropFrontLayer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Backdrop.BackdropFrontLayer.html) by setting their [EnableLiquidGlassEffect]() properties to true. This improves visual depth and readability when the backdrop layers are placed over images or colorful layouts. |
| 13 | + |
| 14 | +## Platform and Version Support |
| 15 | + |
| 16 | +1. This feature is supported on .NET 10 or greater. |
| 17 | +2. This feature is supported on macOS 26 and iOS 26 or later. |
| 18 | +3. On platforms or versions below these requirements, the layers render without the acrylic blur effect and fall back to a standard background. |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +- Add the [Syncfusion.Maui.Backdrop](https://www.nuget.org/packages/Syncfusion.Maui.Backdrop) package (for SfBackdropPage, BackdropFrontLayer, BackdropBackLayer). |
| 23 | + |
| 24 | +## Apply Liquid Glass Effect to the back layer |
| 25 | + |
| 26 | +Turn on the liquid glass effect on the back layer by setting [EnableLiquidGlassEffect]() to true. |
| 27 | + |
| 28 | +{% tabs %} |
| 29 | +{% highlight xaml %} |
| 30 | + |
| 31 | +<?xml version="1.0" encoding="utf-8" ?> |
| 32 | +<backdrop:SfBackdropPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
| 33 | + xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
| 34 | + x:Class="AcrylicBackdropPage" |
| 35 | + xmlns:backdrop="clr-namespace:Syncfusion.Maui.Backdrop;assembly=Syncfusion.Maui.Backdrop"> |
| 36 | + |
| 37 | + <backdrop:SfBackdropPage.BackLayer> |
| 38 | + <backdrop:BackdropBackLayer EnableLiquidGlassEffect="True"> |
| 39 | + <Grid> |
| 40 | + <!-- Optional: colorful/image background to visualize acrylic --> |
| 41 | + <Image Source="wallpaper.jpg" Aspect="AspectFill" /> |
| 42 | + <StackLayout Padding="16"> |
| 43 | + <Label Text="Back layer content" FontSize="16"/> |
| 44 | + </StackLayout> |
| 45 | + </Grid> |
| 46 | + </backdrop:BackdropBackLayer> |
| 47 | + </backdrop:SfBackdropPage.BackLayer> |
| 48 | + |
| 49 | + <backdrop:SfBackdropPage.FrontLayer> |
| 50 | + <backdrop:BackdropFrontLayer> |
| 51 | + <Grid BackgroundColor="WhiteSmoke" /> |
| 52 | + </backdrop:BackdropFrontLayer> |
| 53 | + </backdrop:SfBackdropPage.FrontLayer> |
| 54 | +</backdrop:SfBackdropPage> |
| 55 | + |
| 56 | +{% endhighlight %} |
| 57 | +{% highlight c# %} |
| 58 | + |
| 59 | +using Syncfusion.Maui.Backdrop; |
| 60 | + |
| 61 | +this.BackLayer = new BackdropBackLayer |
| 62 | +{ |
| 63 | + EnableLiquidGlassEffect = true, |
| 64 | + Content = new Grid |
| 65 | + { |
| 66 | + Children = |
| 67 | + { |
| 68 | + new Image { Source = "wallpaper.jpg", Aspect = Aspect.AspectFill }, |
| 69 | + new VerticalStackLayout |
| 70 | + { |
| 71 | + Padding = 16, |
| 72 | + Children = { new Label { Text = "Back layer content", FontSize = 16 } } |
| 73 | + } |
| 74 | + } |
| 75 | + } |
| 76 | +}; |
| 77 | + |
| 78 | +this.FrontLayer = new BackdropFrontLayer |
| 79 | +{ |
| 80 | + Content = new Grid { BackgroundColor = Colors.WhiteSmoke } |
| 81 | +}; |
| 82 | + |
| 83 | +{% endhighlight %} |
| 84 | +{% endtabs %} |
| 85 | + |
| 86 | +## Apply Liquid Glass Effect to the front layer |
| 87 | + |
| 88 | +You can enable the liquid glass effect for the front layer as well by setting [EnableLiquidGlassEffect]() to true. |
| 89 | + |
| 90 | +{% tabs %} |
| 91 | +{% highlight xaml %} |
| 92 | + |
| 93 | +<?xml version="1.0" encoding="utf-8" ?> |
| 94 | +<backdrop:SfBackdropPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
| 95 | + xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
| 96 | + x:Class="AcrylicBackdropFrontPage" |
| 97 | + xmlns:backdrop="clr-namespace:Syncfusion.Maui.Backdrop;assembly=Syncfusion.Maui.Backdrop"> |
| 98 | + |
| 99 | + <backdrop:SfBackdropPage.BackLayer> |
| 100 | + <backdrop:BackdropBackLayer> |
| 101 | + <Grid> |
| 102 | + <Label Text="Menu" HorizontalOptions="Center" VerticalOptions="Center"/> |
| 103 | + </Grid> |
| 104 | + </backdrop:BackdropBackLayer> |
| 105 | + </backdrop:SfBackdropPage.BackLayer> |
| 106 | + |
| 107 | + <backdrop:SfBackdropPage.FrontLayer> |
| 108 | + <backdrop:BackdropFrontLayer EnableLiquidGlassEffect="True"> |
| 109 | + <Grid> |
| 110 | + <!-- Optional: place bright imagery behind the surface to visualize blur --> |
| 111 | + <Image Source="wallpaper.jpg" Aspect="AspectFill" /> |
| 112 | + <StackLayout Padding="16"> |
| 113 | + <Label Text="Front layer content" FontSize="16"/> |
| 114 | + </StackLayout> |
| 115 | + </Grid> |
| 116 | + </backdrop:BackdropFrontLayer> |
| 117 | + </backdrop:SfBackdropPage.FrontLayer> |
| 118 | +</backdrop:SfBackdropPage> |
| 119 | + |
| 120 | +{% endhighlight %} |
| 121 | +{% highlight c# %} |
| 122 | + |
| 123 | +using Syncfusion.Maui.Backdrop; |
| 124 | + |
| 125 | +this.BackLayer = new BackdropBackLayer |
| 126 | +{ |
| 127 | + Content = new Grid |
| 128 | + { |
| 129 | + Children = { new Label { Text = "Menu", HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center } } |
| 130 | + } |
| 131 | +}; |
| 132 | + |
| 133 | +this.FrontLayer = new BackdropFrontLayer |
| 134 | +{ |
| 135 | + EnableLiquidGlassEffect = true, |
| 136 | + Content = new Grid |
| 137 | + { |
| 138 | + Children = |
| 139 | + { |
| 140 | + new Image { Source = "wallpaper.jpg", Aspect = Aspect.AspectFill }, |
| 141 | + new VerticalStackLayout |
| 142 | + { |
| 143 | + Padding = 16, |
| 144 | + Children = { new Label { Text = "Front layer content", FontSize = 16 } } |
| 145 | + } |
| 146 | + } |
| 147 | + } |
| 148 | +}; |
| 149 | + |
| 150 | +{% endhighlight %} |
| 151 | +{% endtabs %} |
| 152 | + |
| 153 | +N> |
| 154 | +* Liquid Glass effects are most visible over images or colorful backgrounds. |
| 155 | +* You can enable the effect independently on either the back layer, the front layer, or both as needed. |
| 156 | + |
| 157 | +## Best Practices and Tips |
| 158 | + |
| 159 | +- The back and front layers use built-in acrylic when their [EnableLiquidGlassEffect]() property is true. |
| 160 | +- Place imagery or vibrant backgrounds beneath the layer surface to see the blur clearly. |
| 161 | +- Combine with existing layout properties (RevealedHeight, EdgeShape, etc.) to achieve the desired design while using the effect. |
| 162 | + |
| 163 | +The following screenshots illustrate the back and front layers with the liquid glass effect enabled over colorful backgrounds. |
0 commit comments