Question

I'm wanting to create a background style in xaml, that is similar to the image below, how could I do this?

enter image description here

Was it helpful?

Solution

If the object you want to put this background on is a border or a grid, you can just add a Path object behind the rest of your content in that control:

<Border Width="100" Height="50">
  <Path Data="m0,0 L 0 50 L 100 50 L 100 30 C 70 0 30 25 0 0">
    <Path.Fill>
      <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Offset="0.3" Color="Green"/>
        <GradientStop Offset="1" Color="#FF99bb99"/>
      </LinearGradientBrush>
    </Path.Fill>
  </Path>
</Border>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top