Skip to content

Commit 80c362c

Browse files
Merge pull request #3914 from syncfusion-content/997111-UG-Content-for-IE-Controls
997111-Added UG content for kanban and IE controls liquid glass effect support
2 parents f8e8757 + 026e4bd commit 80c362c

File tree

2 files changed

+119
-1
lines changed

2 files changed

+119
-1
lines changed
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
layout: post
3+
title: Liquid Glass Effect for .NET MAUI Image Editor | Syncfusion®
4+
description: Learn how to enable and customize the Liquid Glass Effect in the Syncfusion® .NET MAUI Image Editor (SfImageEditor) control.
5+
platform: MAUI
6+
control: SfImageEditor
7+
documentation: ug
8+
---
9+
10+
# Liquid Glass Effect in .NET MAUI Image Editor (SfImageEditor)
11+
12+
The Liquid Glass Effect introduces a modern, translucent design with adaptive color tinting and light refraction, creating a sleek, glass like user experience that remains clear and accessible. This section explains how to enable and customize the effect in the Syncfusion® .NET MAUI Image Editor (SfImageEditor) control.
13+
14+
## Apply liquid glass effect
15+
16+
Follow these steps to enable and configure the Liquid Glass Effect in the Image Editor control:
17+
18+
### Step 1: Wrap the control inside glass effect view
19+
20+
To apply the Liquid Glass Effect to Syncfusion® .NET MAUI `ImageEditor` control, wrap the control inside the `SfGlassEffectView` class.
21+
22+
For more details, refer to the `Liquid Glass Getting Started documentation`.
23+
24+
### Step 2: Enable the liquid glass effect on Image Editor
25+
26+
Set the `EnableLiquidGlassEffect` property to `true` in the `SfImageEditor` control to apply the Liquid Glass Effect. When enabled, the effect is also applied to its dependent controls and provides responsive interaction for a smooth and engaging user experience.
27+
28+
### Step 3: Customize the background
29+
30+
To achieve a glass like background in the Image Editor and its Toolbar control, set the `Background` property to `Transparent`. The background will then be treated as a tinted color, ensuring a consistent glass effect across the controls.
31+
32+
The following code snippet demonstrates how to apply the Liquid Glass Effect to the `SfImageEditor` control:
33+
34+
{% tabs %}
35+
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="14 16 20" %}
36+
37+
<Grid>
38+
<Grid.Background>
39+
<LinearGradientBrush StartPoint="0,0"
40+
EndPoint="0,1">
41+
<GradientStop Color="#0F4C75"
42+
Offset="0.0"/>
43+
<GradientStop Color="#3282B8"
44+
Offset="0.5"/>
45+
<GradientStop Color="#1B262C"
46+
Offset="1.0"/>
47+
</LinearGradientBrush>
48+
</Grid.Background>
49+
50+
<core:SfGlassEffectView EffectType="Regular"
51+
CornerRadius="20">
52+
<imageEditor:SfImageEditor x:Name="imageEditor"
53+
Background="Transparent"
54+
SelectionStroke="#AE97FF"
55+
Source="editorimage.png"
56+
EnableLiquidGlassEffect="True">
57+
<imageEditor:SfImageEditor.ToolbarSettings>
58+
<imageEditor:ImageEditorToolbarSettings Background="Transparent"
59+
Stroke="Transparent"/>
60+
</imageEditor:SfImageEditor.ToolbarSettings>
61+
</imageEditor:SfImageEditor>
62+
</core:SfGlassEffectView>
63+
</Grid>
64+
65+
{% endhighlight %}
66+
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="21 22 23 24 25 30" %}
67+
68+
using Syncfusion.Maui.Core;
69+
using Syncfusion.Maui.ImageEditor;
70+
71+
var gradientBrush = new LinearGradientBrush
72+
{
73+
StartPoint = new Point(0, 0),
74+
EndPoint = new Point(0, 1),
75+
GradientStops = new GradientStopCollection
76+
{
77+
new GradientStop { Color = Color.FromArgb("#0F4C75"), Offset = 0.0f },
78+
new GradientStop { Color = Color.FromArgb("#3282B8"), Offset = 0.5f },
79+
new GradientStop { Color = Color.FromArgb("#1B262C"), Offset = 1.0f }
80+
}
81+
};
82+
83+
var grid = new Grid
84+
{
85+
Background = gradientBrush
86+
};
87+
88+
var glassView = new SfGlassEffectsView
89+
{
90+
CornerRadius = 20,
91+
EffectType = LiquidGlassEffectType.Regular
92+
};
93+
94+
var imageEditor = new SfImageEditor
95+
{
96+
Background = Colors.Transparent,
97+
EnableLiquidGlassEffect = true,
98+
SelectionStroke = Color.FromArgb("#AE97FF"),
99+
Source = ImageSource.FromFile("editorimage.png"),
100+
EnableLiquidGlassEffect = true,
101+
ToolbarSettings = new ImageEditorToolbarSettings
102+
{
103+
Background = Colors.Transparent,
104+
Stroke = Colors.Transparent
105+
}
106+
};
107+
108+
glassView.Content = this.imageEditor;
109+
grid.Children.Add(glassView);
110+
this.Content = grid;
111+
112+
{% endhighlight %}
113+
{% endtabs %}
114+
115+
N>
116+
* Supported on `macOS 26 or higher` and `iOS 26 or higher`.
117+
* This feature is available only in `.NET 10.`

maui-toc.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,9 +806,10 @@
806806
<li><a href="/maui/ImageEditor/toolbar-customization">Toolbar</a></li>
807807
<li><a href="/maui/ImageEditor/events">Events</a></li>
808808
<li><a href="/maui/ImageEditor/serialization">Serialization</a></li>
809-
<li><a href="/maui/ImageEditor/localization">Localization</a></li>
809+
<li><a href="/maui/ImageEditor/localization">Localization</a></li>
810810
<li><a href="/maui/ImageEditor/right-to-left">Right To Left</a></li>
811811
<li><a href="/maui/ImageEditor/accessibility">Accessibility</a></li>
812+
<li><a href="/maui/ImageEditor/liquid-glass-effect">Liquid Glass UI</a></li>
812813
</ul>
813814
</li>
814815
<li>

0 commit comments

Comments
 (0)