Skip to content

Commit 8d103d9

Browse files
committed
997111-Addressed review changes.
1 parent d75b4b7 commit 8d103d9

File tree

2 files changed

+39
-9
lines changed

2 files changed

+39
-9
lines changed

MAUI/ImageEditor/liquid-glass-effect.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ control: SfImageEditor
77
documentation: ug
88
---
99

10-
# Liquid Glass Effect for Image Editor
10+
# Liquid Glass Effect in .NET MAUI Image Editor (SfImageEditor)
1111

1212
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.
1313

@@ -27,12 +27,12 @@ Set the `EnableLiquidGlassEffect` property to `true` in the `SfImageEditor` cont
2727

2828
### Step 3: Customize the background
2929

30-
To achieve a glass like background in the Image Editor and its Toolbar, set the `Background` property to `Transparent`. The background will then be treated as a tinted color, ensuring a consistent glass effect across the controls.
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.
3131

3232
The following code snippet demonstrates how to apply the Liquid Glass Effect to the `SfImageEditor` control:
3333

3434
{% tabs %}
35-
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="14 15 16 21" %}
35+
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="14 16 20" %}
3636

3737
<Grid>
3838
<Grid.Background>
@@ -48,7 +48,6 @@ The following code snippet demonstrates how to apply the Liquid Glass Effect to
4848
</Grid.Background>
4949

5050
<core:SfGlassEffectView EffectType="Regular"
51-
EnableShadowEffect="True"
5251
CornerRadius="20">
5352
<imageEditor:SfImageEditor x:Name="imageEditor"
5453
Background="Transparent"
@@ -64,20 +63,51 @@ The following code snippet demonstrates how to apply the Liquid Glass Effect to
6463
</Grid>
6564

6665
{% endhighlight %}
67-
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="4 6 7 8 9 11" %}
66+
{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="21 22 23 24 25 30" %}
6867

6968
using Syncfusion.Maui.Core;
7069
using Syncfusion.Maui.ImageEditor;
7170

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+
7288
var glassView = new SfGlassEffectsView
7389
{
7490
CornerRadius = 20,
75-
EffectType = LiquidGlassEffectType.Regular,
76-
EnableShadowEffect = true
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+
}
77106
};
78107

79-
this.imageEditor.EnableLiquidGlassEffect = true;
80108
glassView.Content = this.imageEditor;
109+
grid.Children.Add(glassView);
110+
this.Content = grid;
81111

82112
{% endhighlight %}
83113
{% endtabs %}

maui-toc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@
809809
<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 Support</a></li>
812+
<li><a href="/maui/ImageEditor/liquid-glass-effect">Liquid Glass UI</a></li>
813813
</ul>
814814
</li>
815815
<li>

0 commit comments

Comments
 (0)