Skip to content

Commit 005dad2

Browse files
committed
997111 - Added C# code snippet properly
1 parent 0d03ba8 commit 005dad2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

MAUI/ImageEditor/liquid-glass-effect.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@ The following code snippet demonstrates how to apply the Liquid Glass Effect to
7171
using Syncfusion.Maui.Core;
7272
using Syncfusion.Maui.ImageEditor;
7373

74+
var gradientBrush = new LinearGradientBrush
75+
{
76+
StartPoint = new Point(0, 0),
77+
EndPoint = new Point(0, 1),
78+
GradientStops = new GradientStopCollection
79+
{
80+
new GradientStop { Color = Color.FromArgb("#0F4C75"), Offset = 0.0f },
81+
new GradientStop { Color = Color.FromArgb("#3282B8"), Offset = 0.5f },
82+
new GradientStop { Color = Color.FromArgb("#1B262C"), Offset = 1.0f }
83+
}
84+
};
85+
86+
var grid = new Grid
87+
{
88+
Background = gradientBrush
89+
};
90+
7491
var glassView = new SfGlassEffectsView
7592
{
7693
CornerRadius = 20,
@@ -80,6 +97,8 @@ var glassView = new SfGlassEffectsView
8097

8198
this.imageEditor.EnableLiquidGlassEffect = true;
8299
glassView.Content = this.imageEditor;
100+
grid.Children.Add(glassView);
101+
this.Content = grid;
83102

84103
{% endhighlight %}
85104
{% endtabs %}

0 commit comments

Comments
 (0)