|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Liquid Glass Support for .NET MAUI Image Editor Control | Syncfusion® |
| 4 | +description: Learn how to enable liquid glass support for the Syncfusion® .NET MAUI ImageEditor(SfImageEditor) control using SfGlassEffectsView. |
| 5 | +platform: MAUI |
| 6 | +control: SfImageEditor |
| 7 | +documentation: ug |
| 8 | +--- |
| 9 | + |
| 10 | +# Liquid Glass Support |
| 11 | + |
| 12 | +The `SfImageEditor` supports a liquid glass appearance by hosting the control inside the Syncfusion [SfGlassEffectsView](). You can customize the effect using properties such as [EffectType](), [EnableShadowEffect](), and round the corners using [CornerRadius](). This approach improves visual depth and readability when the Image Editor is placed over images or colorful layouts. |
| 13 | + |
| 14 | +Additionally, you can apply the glass effect to the ImageEditor control by enabling the [EnableLiquidGlassEffect]() property. |
| 15 | + |
| 16 | +## Platform and Version Support |
| 17 | + |
| 18 | +1. This feature is supported on .NET 10 or greater. |
| 19 | +2. This feature is supported on macOS 26 and iOS 26 or later. |
| 20 | +3. On platforms or versions below these requirements, the control renders without the acrylic blur effect and falls back to a standard background. |
| 21 | + |
| 22 | +## Prerequisites |
| 23 | + |
| 24 | +- Add the [Syncfusion.Maui.Core](https://www.nuget.org/packages/Syncfusion.Maui.Core/) package (for SfGlassEffectsView). |
| 25 | +- Add the [Syncfusion.Maui.ImageEditor](https://www.nuget.org/packages/Syncfusion.Maui.ImageEditor/) package (for SfImageEditor). |
| 26 | + |
| 27 | +## Apply Liquid Glass Effect to SfImageEditor |
| 28 | + |
| 29 | +Wrap the `SfImageEditor` inside an [SfGlassEffectsView]() to give the Image Editor surface a glass (blurred or clear) appearance. |
| 30 | + |
| 31 | +{% tabs %} |
| 32 | +{% highlight xaml %} |
| 33 | + |
| 34 | +<Grid> |
| 35 | + <Image Source="liquidglassimage.jpg" |
| 36 | + Aspect="AspectFill" /> |
| 37 | + |
| 38 | + <core:SfGlassEffectView> |
| 39 | + <imageEditor:SfImageEditor x:Name="imageEditor" |
| 40 | + Background="Transparent" |
| 41 | + SelectionStroke="#AE97FF" |
| 42 | + Source="{converters:SfImageResource Source={OnPlatform Default=imageeditordesktop.png, Android=imageeditormobile.png, iOS=imageeditormobile.png}}" |
| 43 | + EnableLiquidGlassEffect="True"> |
| 44 | + <imageEditor:SfImageEditor.ToolbarSettings> |
| 45 | + <imageEditor:ImageEditorToolbarSettings Background="Transparent" |
| 46 | + Stroke="Transparent"/> |
| 47 | + </imageEditor:SfImageEditor.ToolbarSettings> |
| 48 | + </imageEditor:SfImageEditor> |
| 49 | + </core:SfGlassEffectView> |
| 50 | +</Grid> |
| 51 | + |
| 52 | +{% endhighlight %} |
| 53 | +{% highlight c# %} |
| 54 | + |
| 55 | +using Syncfusion.Maui.Core; |
| 56 | +using Syncfusion.Maui.ImageEditor; |
| 57 | + |
| 58 | +var glassView = new SfGlassEffectsView |
| 59 | +{ |
| 60 | + CornerRadius = 20, |
| 61 | + Padding = new Thickness(12), |
| 62 | + EffectType = LiquidGlassEffectType.Regular, |
| 63 | + EnableShadowEffect = true |
| 64 | +}; |
| 65 | + |
| 66 | +this.imageEditor.EnableLiquidGlassEffect = true; |
| 67 | +glassView.Content = this.imageEditor; |
| 68 | + |
| 69 | +{% endhighlight %} |
| 70 | +{% endtabs %} |
| 71 | + |
| 72 | +N> |
| 73 | +* Liquid Glass effects are most visible over images or colorful backgrounds. |
| 74 | +* Use EffectType="Regular" for a blurrier look and "Clear" for a glassy look. |
| 75 | + |
| 76 | +## Key Properties |
| 77 | + |
| 78 | +- [EffectType](): Choose between Regular (blurry) and Clear (glassy) effects. |
| 79 | +- [EnableShadowEffect](): Enables a soft shadow around the acrylic container. |
| 80 | +- [CornerRadius](): Rounds the corners of the acrylic container. |
| 81 | +- Padding/Height/Width: Adjust layout around the ImageEditor control. |
| 82 | + |
| 83 | +## Best Practices and Tips |
| 84 | + |
| 85 | +- Hosting the Image Editor control inside [SfGlassEffectsView]() gives the control body an acrylic look. |
| 86 | +- For the most noticeable effect, place the control over images or vibrant backgrounds. |
| 87 | + |
| 88 | +The following screenshot illustrates `SfImageEditor` hosted within an acrylic container, and the dialog mode using the glass effect. |
0 commit comments