How do i add a bit of a gradient to a border or stackpanel so the front part of it looks like it has a bit of a gradient or a curve making it look a bit 3d
Thanks, Jan开发者_StackOverflow社区e
You can define a custom LinearGradientBrush for the border like so
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1" x:Key="MyBorderBrush">
<GradientStop Offset="0" Color="#FFFFFF"/>
<GradientStop Offset="1" Color="#FFFFFF"/>
</LinearGradientBrush>
To apply the border you add a border brush to the border
<Border BorderBrush="{StaticResource MyBorderBrush}" BorderThickness="1" CornerRadius="4">
<!-- Content -->
</Border>
精彩评论