I have created a Button with rounded corners and white background. But I need borders surrounding the button to look like the button in the attached screenshot:

I have developed this code for the button:
<Button Cursor="Hand" x:Name="login" BorderBrush="Transparent" Background="White" Foreground="Black" FontSize="24" Margin="42,305,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"
Content="LOG IN" Grid.Column="1" FontWeight="Bold" Click="login_Click" RenderTransformOrigin="0.844,0.439" Width="101">
<Button.Effect>
<DropShadowEffect BlurRadius="15" ShadowDepth="0"/>
</Button.Effect>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="Padding" Value="10,2,10,3"/>
<Setter Property="Background" Value="White"/>
</Style>
</Button.Resources>
</Button>
Please give your suggestion.
You could put a Border with a LinearGradientBrush around the Button. The following sample markup should give you the idea:
<Border CornerRadius="10" Padding="2" Grid.Column="1" Width="101" RenderTransformOrigin="0.844,0.439"
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="42,305,0,10">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="LightBlue" Offset="0" />
<GradientStop Color="Blue" Offset="0.75" />
</LinearGradientBrush>
</Border.Background>
<Button Cursor="Hand" x:Name="login" BorderBrush="Transparent" Background="White" Foreground="Black" FontSize="24"
Content="LOG IN" FontWeight="Bold">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="10"/>
</Style>
</Button.Resources>
</Button>
</Border>

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With