I want to do the below settings in code for a button.
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="DarkSlateGray" Offset="0" />
<GradientStop Color="White" Offset="1" />
</LinearGradientBrush>
</Button.Background>
Does anyone know how to do this?
Probably something like this: