title: How do I make a multi-directional gradient in WPF?
body: <p>I currently have a gradient set up in XAML as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Canvas&gt;
      &lt;Canvas.Background&gt;
          &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt;
              &lt;GradientStop Color="Black" Offset="0"/&gt;
              &lt;GradientStop Color="Red" Offset="0.5"/&gt;
              &lt;GradientStop Color="White" Offset="1"/&gt;
          &lt;/LinearGradientBrush&gt;
      &lt;/Canvas.Background&gt;
  &lt;/Canvas&gt;
  </code></pre>
  
  <p>Result:</p>
  
  <p><a href="https://i.stack.imgur.com/mUbRr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mUbRr.png" alt="enter image description here"></a></p>
  
  <p>However, this is not what I want to achieve. What I want is to have one gradient transition to a solid colour. Below is what I am trying to achieve:</p>
  
  <p><a href="https://i.stack.imgur.com/ElZpG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ElZpG.png" alt="enter image description here"></a></p>
  
  <p>As one can see from the above image, there is a white-red gradient at the top, and that transitions smoothly to black as it goes down. I have yet to find a way to do this, and this is where I need help. Is there a way to do this? If there is, what is the best way to achieve this (that you know of)?</p>