Add below code to your resources or the style page.
&lt:Style x:Key="GlassBorderStyle" TargetType="Border"&gt:
&lt:Setter Property="BorderThickness" Value="2"/&gt:
&lt:Setter Property="Padding" Value="5"/&gt:
&lt:Setter Property="Background"&gt:
&lt:Setter.Value&gt:
&lt:LinearGradientBrush EndPoint="0.75,1" StartPoint="0.25,0"&gt:
&lt:GradientStop Color="#33FFFFFF" Offset="0"/&gt:
&lt:GradientStop Color="#C0FFFFFF" Offset="0.287"/&gt:
&lt:GradientStop Color="#4011322D" Offset="0.683"/&gt:
&lt:GradientStop Color="#33FFFFFF" Offset="1"/&gt:
&lt:/LinearGradientBrush&gt:
&lt:/Setter.Value&gt:
&lt:/Setter&gt:
&lt:Setter Property="BorderBrush"&gt:
&lt:Setter.Value&gt:
&lt:LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt:
&lt:GradientStop Color="#5811322D" Offset="0"/&gt:
&lt:GradientStop Color="#3EFFFFFF" Offset="0.25"/&gt:
&lt:GradientStop Color="#FFFFFFFF" Offset="0.5"/&gt:
&lt:GradientStop Color="#3EFFFFFF" Offset="0.75"/&gt:
&lt:GradientStop Color="#BFFFFFFF" Offset="1"/&gt:
&lt:/LinearGradientBrush&gt:
&lt:/Setter.Value&gt:
&lt:/Setter&gt:
&lt:Setter Property="Effect"&gt:
&lt:Setter.Value&gt:
&lt:DropShadowEffect BlurRadius="3" ShadowDepth="3" Opacity="0.5"/&gt:
&lt:/Setter.Value&gt:
&lt:/Setter&gt:
&lt:/Style&gt:

now create a button and apply the resource of that Glass Border.
&lt:Border x:Name="GlassBorder" Height="100" Width="250" CornerRadius="10" Style="{StaticResource GlassBorderStyle}"&gt:
&lt:Button Content="Glass Border Style"/&gt:
&lt:/Border&gt:

0 comments:

Post a Comment